The mail composer
Opens the system composer prefilled and blocks until it closes, returning "sent", "saved", "cancelled" or "failed". In-app only, and isAvailable is also false on a device with no account set up.
Properties
isAvailableBooleanFalse in a widget, or with no mail account set up.
Methods
Mail.compose(options)StringRecipients take a string or an array.
- options Any required
- to [String]
Recipients.
- cc [String]
Carbon copy.
- bcc [String]
Blind carbon copy.
- subject String
The subject line.
- body String
The message.
- isHTML Boolean
Treat body as HTML.
- to [String]
Examples
Sending a report
if (Mail.isAvailable) {
Mail.compose({ to: "me@example.com", subject: "Steps", body: summary });
}