wiki:Documentation/ARexxAPI/GETMAILINFO

Version 3 (modified by AmigaPhil, 12 months ago) (diff)

--

Languages:


ARexx API

    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

    /* Enable result codes */

    OPTIONS RESULTS

    /* Request info */

    GETMAILINFO ACTIVE VAR posi
    GETMAILINFO STATUS VAR status
    GETMAILINFO FROM VAR from
    GETMAILINFO TO VAR to
    GETMAILINFO REPLY VAR replyto
    GETMAILINFO SUBJECT VAR subj
    GETMAILINFO FILE VAR path

    /* 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 ?