Email is a method of exchanging digital messages. Email systems are based on a store-and-forward model, in which email server computer systems accept, forward, deliver, and store messages on behalf of users, who only need to connect to the email infrastructure, typically an email server, with a network-enabled device for the duration of a message submission or retrieval.
This feature is supported in mobile applications only.
Email provides features for composing, saving, and sending email messages using an SMTP (SMTP used for sending emails through the Internet is described in the RFC5321/5322 standards). It provides services to applications that make use of the email service.
The Email API can be utilized by any component in the application layer which facilitates the end user to perform email messaging. For example, the Email APIs can be invoked by a multimedia module when the user wants to send a media file through email, or by an email application when the user tries to send an email message.
Figure: Email service architecture
The main features of the Email API include:
- Preparing email messages: set the subject, body, and recipients of the message, and the file path for any attachments.
- Sending email messages.
- Registering a callback function to be notified of the message status.
Email sending is asynchronous and the application must not wait for the result. The process can be slow (connections must be established), and even if the mail server is not available a message sending is not a failure if a spooling mechanism exists. Use the callback function to receive the status when the message has been sent.
Note that once the email_send_message() function is called, the message content is out of the application's control. Even if the message appears not to have finished sending, it can no longer be modified.