c0de_net/mail
How c0de net sends requests and mail, its settings, its errors and its examples are in the tab c0de_net/http: Getting started, Errors, Examples.
The mail library sends mail over SMTP and reads and manages mailboxes over IMAP. Mail is plain text, without HTML and attachments.
Every function opens a connection of its own, logs in, does its work and logs out. Nothing stays open between two calls. The functions for messages work in the folder that IMAP_SELECT stored in the IMAP_SERVER variable, so pass that variable to them.
Functions
- SMTP_SERVER: A struct type with the connection to a server that sends mail, like the one of your mail provider.
- IMAP_SERVER: A struct type with the connection to a server with mailboxes.
- MAIL: A struct type with a message that IMAP_FETCH read.
- MAILBOX: A struct type with the status of a folder, from IMAP_STATUS and IMAP_SELECT.
- SMTP_SEND: Sends a plain text message and returns its Message-ID.
- IMAP_LIST: Returns the names of the folders.
- IMAP_CREATE: Creates a folder.
- IMAP_DELETE: Deletes a folder with its messages.
- IMAP_RENAME: Renames a folder.
- IMAP_STATUS: Returns the status of a folder without selecting it.
- IMAP_SELECT: Selects a folder: checks that it exists and stores its name in folder of the variable.
- IMAP_SEARCH: Returns the UIDs of the messages of the selected folder that match the criteria, oldest first.
- IMAP_FETCH: Reads messages of the selected folder.
- IMAP_STORE: Changes the flags of messages of the selected folder.
- IMAP_MOVE: Moves messages of the selected folder into another folder.
- IMAP_EXPUNGE: Removes the messages of the selected folder that have the flag \Deleted, and returns how many.