UNPKG

1.14 kBTypeScriptView Raw
1import { MailComposerOptions, MailComposerResult } from './MailComposer.types';
2/**
3 * Opens a mail modal for iOS and a mail app intent for Android and fills the fields with provided
4 * data. On iOS you will need to be signed into the Mail app.
5 * @return A promise fulfilled with an object containing a `status` field that specifies whether an
6 * email was sent, saved, or cancelled. Android does not provide this info, so the status is always
7 * set as if the email were sent.
8 */
9export declare function composeAsync(options: MailComposerOptions): Promise<MailComposerResult>;
10/**
11 * Determine if the `MailComposer` API can be used in this app.
12 * @return A promise resolves to `true` if the API can be used, and `false` otherwise.
13 * - Returns `true` on iOS when the device has a default email setup for sending mail.
14 * - Can return `false` on iOS if an MDM profile is setup to block outgoing mail. If this is the
15 * case, you may want to use the Linking API instead.
16 * - Always returns `true` in the browser and on Android.
17 */
18export declare function isAvailableAsync(): Promise<boolean>;
19export * from './MailComposer.types';