How to open up the email composer with Expo
May 3, 2020
Note: this won’t work properly when testing on iOS Simulators since you can’t sign into a mail account on the simulator.
Install the expo-mail-composer
package to your Expo project:
expo install expo-mail-composer
Now, you can import and use the module. For example:
import * as MailComposer from "expo-mail-composer"
// Opens prefilled email
MailComposer.composeAsync({
recipients: [], // array of email addresses
subject: "",
body: ""
})
Subscribe to my newsletter!
A weekly round-up of new blog posts and updates to projects I’m working on.