Changes between Version 3 and Version 4 of Documentation/ARexxAPI/MAILINFO


Ignore:
Timestamp:
Feb 5, 2014 10:04:38 AM (8 months ago)
Author:
damato
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Documentation/ARexxAPI/MAILINFO

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