The Mail component represents an email message.
To send an email: create a instance of Mail, set its attributes (like from, recipient, subject, contentType, message) and send it either by invoking method Mail.send() or using the MailSender component.
The Mail.send() method uses the SMTP (Simple Mail Transfer Protocol) server configured in the Process Execution Engine properties. The MailSender component uses an External Resource configuration of type Mail Outgoing Service, where you specify the connectivity information to your SMTP server.
You can receive emails (instances of Mail) using the MailAccount component.
Use attribute contentType to specify the email's content-type header field, which defines the type/subtype of the email body. The content-type may also include additional information, like the character set.
The following example sends an email message to a recipient:
Mail.recipient = "example_recipient@oracle.com" Mail.from = "example_sender@oracle.com" Mail.subject = "Example Message" Mail.contentType = "Content-type: text/plain; charset=UTF-8" Mail.message = "This is an example email message." send Mail