wiki:Documentation/ARexxAPI/MAILINFO

Version 5 (modified by Jens Maus, 4 years ago) (diff)

Languages:

ARexx Function List

  1. Documentation/ARexxAPI/ADDRDELETE
  2. Documentation/ARexxAPI/ADDREDIT
  3. Documentation/ARexxAPI/ADDRFIND
  4. Documentation/ARexxAPI/ADDRGOTO
  5. Documentation/ARexxAPI/ADDRINFO
  6. Documentation/ARexxAPI/ADDRLOAD
  7. Documentation/ARexxAPI/ADDRNEW
  8. Documentation/ARexxAPI/ADDRRESOLVE
  9. Documentation/ARexxAPI/ADDRSAVE
  10. Documentation/ARexxAPI/APPBUSY
  11. Documentation/ARexxAPI/APPNOBUSY
  12. Documentation/ARexxAPI/FINDMAIL
  13. Documentation/ARexxAPI/FLUSHINDEXES
  14. Documentation/ARexxAPI/FOLDERINFO
  15. Documentation/ARexxAPI/GETCONFIGINFO
  16. Documentation/ARexxAPI/GETFOLDERINFO
  17. Documentation/ARexxAPI/GETMAILINFO
  18. Documentation/ARexxAPI/GETSELECTED
  19. Documentation/ARexxAPI/GETURL
  20. Documentation/ARexxAPI/HELP
  21. Documentation/ARexxAPI/HIDE
  22. Documentation/ARexxAPI/INFO
  23. Documentation/ARexxAPI/ISONLINE
  24. Documentation/ARexxAPI/LISTFREEZE
  25. Documentation/ARexxAPI/LISTSELECT
  26. Documentation/ARexxAPI/LISTUNFREEZE
  27. Documentation/ARexxAPI/MAILARCHIVE
  28. Documentation/ARexxAPI/MAILBOUNCE
  29. Documentation/ARexxAPI/MAILCHANGESUBJECT
  30. Documentation/ARexxAPI/MAILCHECK
  31. Documentation/ARexxAPI/MAILCOPY
  32. Documentation/ARexxAPI/MAILDELETE
  33. Documentation/ARexxAPI/MAILEDIT
  34. Documentation/ARexxAPI/MAILEXPORT
  35. Documentation/ARexxAPI/MAILFILTER
  36. Documentation/ARexxAPI/MAILFORWARD
  37. Documentation/ARexxAPI/MAILIMPORT
  38. Documentation/ARexxAPI/MAILINFO
  39. Documentation/ARexxAPI/MAILMOVE
  40. Documentation/ARexxAPI/MAILREAD
  41. Documentation/ARexxAPI/MAILREPLY
  42. Documentation/ARexxAPI/MAILSEND
  43. Documentation/ARexxAPI/MAILSENDALL
  44. Documentation/ARexxAPI/MAILSTATUS
  45. Documentation/ARexxAPI/MAILUPDATE
  46. Documentation/ARexxAPI/MAILWRITE
  47. Documentation/ARexxAPI/NEWMAILFILE
  48. Documentation/ARexxAPI/QUIT
  49. Documentation/ARexxAPI/READCLOSE
  50. Documentation/ARexxAPI/READINFO
  51. Documentation/ARexxAPI/READPRINT
  52. Documentation/ARexxAPI/READSAVE
  53. Documentation/ARexxAPI/REQUEST
  54. Documentation/ARexxAPI/REQUESTFILE
  55. Documentation/ARexxAPI/REQUESTFOLDER
  56. Documentation/ARexxAPI/REQUESTSTRING
  57. Documentation/ARexxAPI/RESTART
  58. Documentation/ARexxAPI/SCREENTOBACK
  59. Documentation/ARexxAPI/SCREENTOFRONT
  60. Documentation/ARexxAPI/SETFLAG
  61. Documentation/ARexxAPI/SETFOLDER
  62. Documentation/ARexxAPI/SETMAIL
  63. Documentation/ARexxAPI/SETMAILFILE
  64. Documentation/ARexxAPI/SHOW
  65. Documentation/ARexxAPI/USERINFO
  66. Documentation/ARexxAPI/WRITEATTACH
  67. Documentation/ARexxAPI/WRITEBCC
  68. Documentation/ARexxAPI/WRITECC
  69. Documentation/ARexxAPI/WRITEEDITOR
  70. Documentation/ARexxAPI/WRITEFROM
  71. Documentation/ARexxAPI/WRITEIDENTITY
  72. Documentation/ARexxAPI/WRITELETTER
  73. Documentation/ARexxAPI/WRITEMAILTO
  74. Documentation/ARexxAPI/WRITEOPTIONS
  75. Documentation/ARexxAPI/WRITEQUEUE
  76. Documentation/ARexxAPI/WRITEREPLYTO
  77. Documentation/ARexxAPI/WRITESEND
  78. Documentation/ARexxAPI/WRITESUBJECT
  79. Documentation/ARexxAPI/WRITETO

MAILINFO

NAME
MailInfo — Return information about a message. (V2.0)
TEMPLATE
VAR/K,STEM/K,INDEX/N
FUNCTION
Returns information about a message in the list, or the current message if none is specified.
INPUTS
VAR/K - alternative variable to put the results into instead of RESULT
STEM/K - base name used for the stems where the returned data will be stored
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
RETURNS
VAR - info returned by the query
<STEM>INDEX - position of the message in the list; the message at the top occupies position 0
<STEM>STATUS - 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
<STEM>FROM - sender of the message; specifically, the first sender noted in the "From:" header
<STEM>TO - recipient of the message; actually, the first recipient noted in the "To:" header
<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
<STEM>CC - first entry in the CC: field, if any
<STEM>BCC - first entry in the BCC: field, if any
<STEM>RESENTTO - first entry in the ResentTo: field, if any
<STEM>SUBJECT - subject of the message (contents of the "Subject:" header)
<STEM>FILENAME - filename where the message is stored, including path
<STEM>SIZE - size of the message, in bytes
<STEM>DATE - date of the message, in "MM-DD-YY HH:MM:SS" format
<STEM>FLAGS - a 9 byte string in "MARCS-77M" format:
MARCS-77M
|||||| ||||
|||||| |||`--------- '''M'''arked flag  (V2.4)
|||||| |`---------- volatile flag (see [[ARexx API/SETFLAG| SETFLAG ]])
|||||| `----------- permanent flag (see [[ARexx API/SETFLAG| SETFLAG ]])
|||||`------------- PGP '''S'''igned
||||`-------------- PGP en'''C'''rypted
|||`--------------- status '''R'''eport
|`---------------- contains '''A'''ttachments
`----------------- '''M'''ultiple recipients
<STEM>MSGID - compressed hexadecimal 32 bit representation of the "Message-ID:" header contents, e.g. BBC62595 (V2.1)
<STEM>FROMALL - all entries from the From: field, the first entry will be the same as for FROM
<STEM>TOALL - all entries from the To: field, the first entry will be the same as for TO
<STEM>REPLYTOALL - all entries from the ReplyTo: field, the first entry will be the same as for REPLYTO
<STEM>CCALL - all entries from the CC: field, the first entry will be the same as for CC
<STEM>BCCALL - all entries from the BCC: field, the first entry will be the same as for BCC
<STEM>RESENTTOALL - all entries from the ResentTo: field, the first entry will be the same as for RESENTTO

RC is set to 10 if INDEX is out of the range of messages available in the folder.

NOTES
Starting with V2.4, <STEM>MSGID returns an hexadecimal value.
Starting with V2.6, the "ALL" variables will return all addresses/names from the corresponding header field.
EXAMPLE
/* Enable result codes */
OPTIONS RESULTS

/* Get info about the current message */
MAILINFO STEM st.

/* Display results */
SAY 'Message:    'st.index
status = st.status
SELECT
   WHEN status = 'N' THEN status = 'New'
   WHEN status = 'O' THEN status = 'Read'
   WHEN status = 'U' THEN status = 'Unread'
   WHEN status = 'R' THEN status = 'Replied'
   WHEN status = 'F' THEN status = 'Forwarded'
   WHEN status = 'S' THEN status = 'Sent'
   WHEN status = 'W' THEN status = 'Pending'
   WHEN status = 'H' THEN status = 'Hold'
   OTHERWISE status = 'Error sending'
END
SAY 'Status:     'status
SAY 'From:       'st.from
SAY 'To:         'st.to
DO i = 0 TO info.TOALL.COUNT-1
   SAY 'To:         'st.TOALL.i
END
SAY 'Reply-To:   'st.replyto
SAY 'Subject:    'st.subject
SAY 'Filename:   'st.filename
SAY 'Size:       'st.size
SAY 'Date:       'st.date
SAY 'Flags:      'st.flags
SAY 'Message-ID: 'st.msgid
BUGS
In V2.3p1, <STEM>FILENAME omitted the folder name part if an INDEX was specified. Fixed in V2.4.
SEE ALSO
SETFLAG