Changes between Initial Version and Version 1 of Documentation/ARexxAPI/MAILINFO


Ignore:
Timestamp:
Sep 23, 2013, 8:04:12 PM (15 months ago)
Author:
AmigaPhil
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Documentation/ARexxAPI/MAILINFO

    v1 v1  
     1== MAILINFO
     2
     3'''NAME'''
     4     MailInfo -- Return information about a message.  (V2.0)
     5
     6'''TEMPLATE'''
     7     VAR/K,STEM/K,INDEX/N
     8
     9'''FUNCTION'''
     10     Returns information about a message in the list, or the current
     11     message if none is specified.
     12
     13'''INPUTS'''
     14     VAR/K     - alternative variable to put the results into instead of RESULT\\
     15     STEM/K    - base name used for the stems where the returned data will be stored\\
     16     INDEX/N   - position of the message you want info about, the message at the top of the list occupying position 0; if no index is specified, the current message will be used\\
     17
     18'''RETURNS'''
     19     VAR               - info returned by the query\\
     20     <STEM>INDEX       - position of the message in the list; the message at the top occupies position 0\\
     21     <STEM>STATUS      - status of the message; possible values are
     22
     23                            N - new\\
     24                            O - read\\
     25                            U - unread\\
     26                            R - replied\\
     27                            F - forwarded\\
     28                            S - sent\\
     29                            W - pending\\
     30                            H - hold\\
     31                            E - error sending\\
     32
     33     <STEM>FROM        - sender of the message; specifically, the first sender noted in the "From:" header\\
     34     <STEM>TO          - recipient of the message; actually, the first recipient noted in the "To:" header\\
     35     <STEM>REPLYTO     - return address of the message; 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\\
     36     <STEM>CC          - first entry in the CC: field, if any\\
     37     <STEM>BCC         - first entry in the BCC: field, if any\\
     38     <STEM>RESENTTO    - first entry in the ResentTo: field, if any\\
     39     <STEM>SUBJECT     - subject of the message (contents of the "Subject:" header)\\
     40     <STEM>FILENAME    - filename where the message is stored, including path\\
     41     <STEM>SIZE        - size of the message, in bytes\\
     42     <STEM>DATE        - date of the message, in "MM-DD-YY HH:MM:SS" format\\
     43     <STEM>FLAGS       - a 9 byte string in "MARCS-77M" format:
     44
     45                            MARCS-77M\\
     46                            !||||| !|||\\
     47                            !||||| !||`--------- '''M'''arked flag  (V2.4)\\
     48                            !||||| |`---------- volatile flag (see [[rx_setflag| SETFLAG ]])\\
     49                            !||||| `----------- permanent flag (see [[rx_setflag| SETFLAG ]])\\
     50                            !||||`------------- PGP '''S'''igned\\
     51                            !|||`-------------- PGP en'''C'''rypted\\
     52                            !||`--------------- status '''R'''eport\\
     53                            |`---------------- contains '''A'''ttachments\\
     54                            `----------------- '''M'''ultiple recipients\\
     55
     56     <STEM>MSGID       - compressed hexadecimal 32 bit representation of the "Message-ID:" header contents, e.g. BBC62595  (V2.1)\\
     57     <STEM>FROMALL     - all entries from the From: field, the first entry will be the same as for FROM\\
     58     <STEM>TOALL       - all entries from the To: field, the first entry will be the same as for TO\\
     59     <STEM>REPLYTOALL  - all entries from the ReplyTo: field, the first entry will be the same as for REPLYTO\\
     60     <STEM>CCALL       - all entries from the CC: field, the first entry will be the same as for CC\\
     61     <STEM>BCCALL      - all entries from the BCC: field, the first entry will be the same as for BCC\\
     62     <STEM>RESENTTOALL - all entries from the ResentTo: field, the first entry will be the same as for RESENTTO\\
     63
     64     RC is set to 10 if INDEX is out of the range of messages available in
     65     the folder.
     66
     67'''NOTES'''
     68     Starting with V2.4, <STEM>MSGID returns an hexadecimal value.\\
     69     Starting with V2.6, the "ALL" variables will return all addresses/names from the
     70        corresponding header field.
     71
     72'''EXAMPLE'''
     73         /* Enable result codes */
     74
     75         OPTIONS RESULTS
     76
     77         /* Get info about the current message */
     78
     79         MAILINFO STEM st.
     80
     81         /* Display results */
     82
     83         SAY 'Message:    'st.index\\
     84         status = st.status\\
     85         SELECT\\
     86            WHEN status = 'N' THEN status = 'New'\\
     87            WHEN status = 'O' THEN status = 'Read'\\
     88            WHEN status = 'U' THEN status = 'Unread'\\
     89            WHEN status = 'R' THEN status = 'Replied'\\
     90            WHEN status = 'F' THEN status = 'Forwarded'\\
     91            WHEN status = 'S' THEN status = 'Sent'\\
     92            WHEN status = 'W' THEN status = 'Pending'\\
     93            WHEN status = 'H' THEN status = 'Hold'\\
     94            OTHERWISE status = 'Error sending'\\
     95         END\\
     96         SAY 'Status:     'status\\
     97         SAY 'From:       'st.from\\
     98         SAY 'To:         'st.to\\
     99         DO i = 0 TO info.TOALL.COUNT-1\\
     100            say 'To:         'st.TOALL.i\\
     101         END\\
     102         SAY 'Reply-To:   'st.replyto\\
     103         SAY 'Subject:    'st.subject\\
     104         SAY 'Filename:   'st.filename\\
     105         SAY 'Size:       'st.size\\
     106         SAY 'Date:       'st.date\\
     107         SAY 'Flags:      'st.flags\\
     108         SAY 'Message-ID: 'st.msgid\\
     109
     110'''BUGS'''
     111     In V2.3p1, <STEM>FILENAME omitted the folder name part if an INDEX
     112     was specified.  Fixed in V2.4.
     113
     114'''SEE ALSO'''
     115     [[rx_setflag| SETFLAG ]]