export interface EmailComposerOptions { app?: string; to?: string | Array; cc?: string | Array; bcc?: string | Array; attachments?: Array; subject?: string; body?: string; isHtml?: boolean; } /** * @beta * @name Email Composer * @description * * Requires Cordova plugin: cordova-plugin-email-composer. For more info, please see the [Email Composer plugin docs](https://github.com/hypery2k/cordova-email-plugin). * * DISCLAIMER: This plugin is experiencing issues with the latest versions of Cordova. Use at your own risk. Functionality is not guaranteed. Please stay tuned for a more stable version. * A good alternative to this plugin is the social sharing plugin. * * @usage * ```typescript * import { EmailComposer } from 'ionic-native'; * * * EmailComposer.isAvailable().then((available: boolean) =>{ * if(available) { * //Now we know we can send * } * }); * * let email = { * to: 'max@mustermann.de', * cc: 'erika@mustermann.de', * bcc: ['john@doe.com', 'jane@doe.com'], * attachments: [ * 'file://img/logo.png', * 'res://icon.png', * 'base64:icon.png//iVBORw0KGgoAAAANSUhEUg...', * 'file://README.pdf' * ], * subject: 'Cordova Icons', * body: 'How are you? Nice greetings from Leipzig', * isHtml: true * }; * * // Send a text message using default options * EmailComposer.open(email); * * ``` * @interfaces * EmailComposerOptions */ export declare class EmailComposer { /** * Verifies if sending emails is supported on the device. * * @param app {string?} An optional app id or uri scheme. * @returns {Promise} Resolves if available, rejects if not available */ static isAvailable(app?: string): Promise; /** * Adds a new mail app alias. * * @param alias {string} The alias name * @param packageName {string} The package name */ static addAlias(alias: string, packageName: string): void; /** * Displays the email composer pre-filled with data. * * @param options {EmailComposerOptions} Email * @param scope {any?} An optional scope for the promise * @returns {Promise} Resolves promise when the EmailComposer has been opened */ static open(options: EmailComposerOptions, scope?: any): Promise; }