602SQL Documentation Index  

Receiving Mail

Mail can be received in the following way (must be initialized first):

  1. Open the mailbox with incoming mail using the MailOpenInBox function.
  2. The MailBoxLoad function will load/view the mailbox contents and write incoming e-mail to the special database tables. The list of incoming e-mail can be displayed and ordered using common database operations.
  3. The text of the selected letter (and/or the text of the header) can be stored in the database using the MailBoxGetMsg or MailBoxGetMsgEx functions (if it was not previously loaded using the MailBoxLoad function).
  4. Attachments (if they were not previously loaded using the MailBoxLoad function) can be stored in the database by the MailBoxGetFilInfo function.
  5. The MailBoxSaveFileAs function saves a specified mail attachment to disk. The MailBoxSaveFileDBs function (or MailBoxSaveFileDBr) saves the specified file attachment into the database.
  6. E-mail that is no longer needed can be deleted using the MailBoxDeleteMsg function.
  7. The mailbox can be closed using the MailCloseInBox function.

The functions for receiving e-mail that work with system tables (e.g. MailBoxLoad, MailBoxGetFilInfo, MailBoxGetMsgEx, MailBoxGetMsg, MailBoxSaveFileDBs, and MailBoxSaveFileDBr) cause a transaction to auto-commit.

List of topics: