Skip to content

Documentation ARexxAPI GETMAILINFO

Jens Maus edited this page Feb 13, 2017 · 1 revision

GETMAILINFO

NAME:: GetMailInfo -- Return information about the current message.

TEMPLATE:: VAR/K,STEM/K,ITEM/A

FUNCTION:: Returns information about the current message.

INPUTS:: VAR/K - alternative variable to put the results into instead of RESULT (V2.0)\ STEM/K- base name used for the stems where the returned data will be stored (V2.0)\ ITEM/A - item to return info about, may be one of - ACT(IVE) - position (0 = first message in the folder) - STA(TUS) - status of the message, possible values are * N - new * O - read * U - unread * R - replied * F - forwarded * S - sent * W - pending * H - hold * E - error sending - FRO(M) - sender - TO - primary recipient - REP(LY) - return address; this will be either the first recipient in the "Reply-To:" header, or the first sender in the "From:" header if no "Reply-To:" header exists - SUB(JECT) - subject - FIL(E) - full path of the message file

RETURNS:: VAR - info returned by the query\ <STEM>VALUE - info returned by the query\

NOTES:: Superseded by MAILINFO in V2.0+. Don't use it in new scripts.

EXAMPLE:: {{{#!arexx /* Enable result codes */ OPTIONS RESULTS

 /* Request 'active' info */
 GETMAILINFO ACTIVE VAR posi
 IF RC ~= 0 THEN EXIT

 /* Request 'status' info */
 GETMAILINFO STATUS VAR status
 IF RC ~= 0 THEN EXIT

 /* Request 'from' info */
 GETMAILINFO FROM VAR from
 IF RC ~= 0 THEN EXIT

 /* Request 'to' info */
 GETMAILINFO TO VAR to
 IF RC ~= 0 THEN EXIT

 /* Request 'reply' info */
 GETMAILINFO REPLY VAR replyto
 IF RC ~= 0 THEN EXIT

 /* Request 'subject' info */
 GETMAILINFO SUBJECT VAR subj
 IF RC ~= 0 THEN EXIT

 /* Request 'file' info */
 GETMAILINFO FILE VAR path
 IF RC ~= 0 THEN EXIT

 /* Display results */
 SAY 'Position: 'posi
 SAY 'Status:   'status
 SAY 'From:     'from
 SAY 'To:       'to
 SAY 'Reply-To: 'replyto
 SAY 'Subject:  'subj
 SAY 'Path:     'path
 }}}

BUGS::

SEE ALSO:: MAILINFO

Home

Getting Started

Troubleshooting

Advanced use of YAM

Cookbooks

Development

Clone this wiki locally