[[:dev|Developer Reference]] / [[dev:api|AOS API Document]] / Messages ====== AOS Messages API commands - RFC ====== \\ Date: 4 Jan. 2001\\ Available: 20 Jan. 2001\\ Status: Draft\\ Compliant to AOS API Version: AOS 2.0b1\\ Revision: 1 - 2 Feb 2001\\ Revision: 2 - 4 Mac 2001\\ Revision: 3 - 1 Oct 2012\\ Web: http://www.afteroffice.com/dev/api/message.html ---------------------------------------------------------------- **Description**\\ Interact with user mailboxes and retrieving messages.\\ **New in revision 3**\\ Fixed URL convention and update the commands.\\ **New in revision 2**\\ Correction to return result of mboxtable.\\ **New in revision 1**\\ More fields are added to the xOpenBox return result.\\ **Index**\\ 1. [[dev:api:message#openbox.mbox.mms|openbox.mbox.mms]] - Obtain list of email in the mailbox\\ 2. [[dev:api:message#rdmail.mbox.mms|rdmail.mbox.mms]] - Obtain full message\\ 3. [[dev:api:message#mboxact.mbox.mms|mboxact.mbox.mms]] - Move or delete messages\\ 4. [[dev:api:message#mboxtable.mbox.mms|mboxtable.mbox.mms]] - Use: Get the user list of mailboxes\\ ---------------------------------------------------------------- ==== openbox.mbox.mms ==== **Command:** [SID].openbox.mbox.mms\\ Use: Obtain list of messages in the mailbox\\ Access: HTTP\\ Method: POST and GET\\ Parameters case sensitive: NO\\ Where: [SID] = the user login session ID\\ **Result:**\\ Multiple-lines records, with TAB as fields separator:\\ the unique ID for message.\\ the subject of the message.\\ the sender name and email (MIME compliant)\\ the message size in byte\\ Unix time stamp (number of second counting from 1/1/1970 8:00 AM)\\ part of the message body.\\ the email Content-Type information.\\ the recipient name and email (MIME compliant)\\ the message flag, "New" or "Read". \\ **Parameters:**\\ API = only 1 argument accepted: "LC"\\ LCTop = number of lines to return, default all.\\ mbox = the mailbox to download, eg: "Inbox"\\ **URL Sample:**\\ http://vo.afteroffice.com/cgi-bin/vo/SIDxxx.openbox.mbox.mms?api=lc&mbox=Inbox\\ **MetaTalk sample:**\\ Convert dateTimeStamp to date # you get the email date\\ Convert dateTimeStamp to time # you get the email time ---------------------------------------------------------------- ==== rdmail.mbox.mms ==== **Command:** [SID].rdmail.mbox.mms\\ Use: Obtain full message.\\ Access: HTTP\\ Method: POST and GET\\ Parameters case sensitive: NO\\ Where: [SID] = the user login session ID\\ **Result:** Raw message in MIME-TYPE\\ **Parameters:**\\ API = only 1 argument accepted: "LC"\\ mbox = mailbox\\ file = the message ID\\ **URL Sample:**\\ http://vo.afteroffice.com/cgi-bin/vo/SIDxxx.rdmail.mbox.mms?api=lc&mbox=Inbox&file=8374747\\ **Note:** downloading message with this API command will not transfer messages from Inbox to Read. Use mboxact.mail() command to move messages instead. ---------------------------------------------------------------- ==== mboxact.mbox.mms ==== **Command:** [SID].mboxact.mbox.mms\\ Use: Move messages from a mailbox to another also use to Delete messages.\\ Access: HTTP\\ Method: POST and GET\\ Parameters case sensitive: NO\\ Where: [SID] = the user login session ID\\ **Result:** True or Error message.\\ **Parameters:**\\ API = only 1 argument accepted: "LC"\\ mbox = the mailbox for the original message\\ mboxTo = [optional] the target mailbox to move to (void if delete)\\ del = [optional] "yes" if delete the message, void if "mov" param is used.\\ mov = [optional] "yes" if moving the message, void if "del" param is used.\\ selall = [optional] "yes" if moving or deleting ALL message in the mailbox.\\ sel = [option] the message Id for move or delete. Multiple sel param supports (void if selall=yes).\\ **URL Sample:**\\ http://vo.afteroffice.com/cgi-bin/vo/SIDxxx.mboxact.mbox.mms?api=lc&mbox=Inbox&mov=yes&sel=32322232&mboxTo=Read\\ **MetaTalk sample:**\\ Convert dateTimeStamp to date # you get the email date\\ Convert dateTimeStamp to time # you get the email time ---------------------------------------------------------------- ==== mboxtable.mbox.mms ==== **Command:** [SID].mboxtable.mbox.mms\\ Use: Get the user list of mailboxes.\\ Access: HTTP\\ Method: POST and GET\\ Parameters case sensitive: NO\\ Where: [SID] = the user login session ID\\ Multiple-lines records, with TAB as fields separator:\\ first field is reserved.\\ the internal mailbox reference name, this name will be used for all mbox param.\\ the full name of the mailbox. This field is void if the mailbox is one of the built-in mailboxes.\\ number of messages in this mailbox\\ **Note:** There are 5 default mailboxes for each user:\\ Inbox, Read, Draft, Sent, Deleted\\ Each of the default mailbox can be referred as the above name directly (English) regardless of the user preferred language or the custom mailbox name.\\ However, for new mailboxes created by user, there will be an "Appearance" name and the actual reference name for it.\\ Use this command if you would like to obtain the full mailbox list of a user (including the custom mailboxes). However, you may avoid this command if you try to access built-in mailboxes (Inbox, Read, Draft, Sent, Deleted).\\ **Parameters:**\\ API = only 1 argument accepted: "LC"\\ **URL Sample:**\\ http://vo.afteroffice.com/cgi-bin/vo/SIDxxx.mboxtable.mbox.mms?api=lc