The Email Composer API provides the ability to programmatically create and send emails from within an app.
EmailComposer.open({
to: 'max@mustermann.de',
cc: 'erika@mustermann.de',
bcc: ['john@doe.com', 'jane@doe.com'],
subject: 'Greetings',
body: 'How are you? Nice greetings from Leipzig'
});
window.EmailComposer.open({
to: "max@mustermann.de",
cc: "erika@mustermann.de",
bcc: ["john@doe.com", "jane@doe.com"],
subject: "Greetings",
body: "How are you? Nice greetings from Leipzig",
});
window.EmailComposer.open({
to: "max@mustermann.de",
cc: "erika@mustermann.de",
bcc: ["john@doe.com", "jane@doe.com"],
subject: "Greetings",
body: "How are you? Nice greetings from Leipzig",
});
(<any>window).EmailComposer.open({
to: "max@mustermann.de",
cc: "erika@mustermann.de",
bcc: ["john@doe.com", "jane@doe.com"],
subject: "Greetings",
body: "How are you? Nice greetings from Leipzig",
});
EmailComposer.open({
to: "max@mustermann.de",
cc: "erika@mustermann.de",
bcc: ["john@doe.com", "jane@doe.com"],
subject: "Greetings",
body: "How are you? Nice greetings from Leipzig"
});
addAlias(alias: string, packageName: string): void
Adds a new mail app alias.
getClients(): Promise<string>
Returns an array of email clients installed on the device.
hasAccount(): Promise<any>
Verifies if an email account is configured on the device.
hasClient(app: string): Promise<any>
Verifies if a specific email client is installed on the device.
hasPermission(app: string): Promise<boolean>
Checks if the app has a permission to access email accounts information.
isAvailable(app?: string): Promise<any>
Verifies if sending emails is supported on the device.
open(options: EmailComposerOptions, scope?: any): Promise<any>
Displays the email composer pre-filled with data.
requestPermission(): Promise<boolean>
Request permission to access email accounts information.
interface nameOrOptions {
// App to send the email with
app ? : string;
// File paths or base64 data streams
attachments ? : string[]
// Email address(es) for BCC field
bcc ? : string | string[]
// Email body (for HTML, set isHtml to true)
body ? : string
// Email address(es) for CC field
cc ? : string | string[]
// Indicates if the body is HTML or plain text
isHtml ? : boolean
// Subject of the email
subject ? : string
// Email address(es) for To field
to ? : string | string[]
// Content type of the email
type ? : string
}