This documentation is available as Markdown for AI agents and LLMs. See the full Markdown index or append .md to any documentation URL.
Expo MailComposer
A library that provides functionality to compose and send emails with the system's specific UI.
expo-mail-composer allows you to compose and send emails quickly and easily using the OS UI. This module can't be used on iOS Simulators since you can't sign into a mail account on them.
Installation
If you are installing this in an existing React Native app, make sure to install expo in your project.
API
import * as MailComposer from 'expo-mail-composer';
Methods
Opens a mail modal for iOS and a mail app intent for Android and fills the fields with provided data. On iOS you will need to be signed into the Mail app.
Promise<MailComposerResult>A promise fulfilled with an object containing a status field that specifies whether an
email was sent, saved, or cancelled. Android does not provide this info, so the status is always
set as if the email were sent.
Retrieves a list of available email clients installed on the device. This can be used to present options to the user for sending emails through their preferred email client, or to open an email client so the user can access their mailbox — for example, to open a confirmation email sent by your app.
MailClient[]An array of available mail clients.
Determine if the MailComposer API can be used in this app.
Promise<boolean>A promise resolves to true if the API can be used, and false otherwise.
- Returns
truewhen the device has a default email setup for sending mail. - Can return
falseon iOS if an MDM profile is setup to block outgoing mail. If this is the case, you may want to use the Linking API instead. - Always returns
truein the browser.