Ben Borgers

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: ""
})

More blog posts

Subscribe to my newsletter for a monthly round-up of new blog posts and projects Iā€™m working on!

Twitter ↗ RSS feed ↗