Expo
How do I send an email or a text message from an Expo app?
Use composeAsync from expo-mail-composer to open a prefilled email, and sendSMSAsync from expo-sms to open a prefilled text. Both open the phone's own compose screen and the user taps send. To send without the user, call an email or SMS API from your backend.
Updated October 31, 2026
If you want a button that opens an email or a text message with the recipient and message already filled in, it takes a few lines with expo-mail-composer and expo-sms. The one thing to know before you start is that neither module can send anything on its own, because both just open the phone’s own compose screen, and it’s up to the user whether to tap send.
How it works
MailComposer.composeAsync opens a mail sheet on iOS and the mail app on Android, with the fields you pass filled in. On iOS, the user has to be signed in to the Mail app, and the module can’t be used in the iOS Simulator at all because you can’t sign in to a mail account there.
SMS.sendSMSAsync opens the phone’s messaging app with the numbers and message you pass. SMS.isAvailableAsync() always returns false in the iOS Simulator and in a browser, so expo-sms is for real phones only.
Both return a result, but Android’s is less useful. On iOS, an email comes back as sent, saved, cancelled, or undetermined, but that information isn’t available on Android, so the status there is always set as if the email were sent. For texts, the result on iOS is sent, cancelled, or unknown, and on Android it’s always unknown.
How to add them
-
Install both modules with
npx expo install expo-mail-composer expo-sms. -
Open a prefilled email, checking first that the phone can send one:
import * as MailComposer from "expo-mail-composer"; export async function emailSupport() { if (!(await MailComposer.isAvailableAsync())) return false; const { status } = await MailComposer.composeAsync({ recipients: ["support@example.com"], subject: "Help with my order", body: "Order number: 1234", }); return status; }composeAsyncalso takesccRecipients,bccRecipients,isHtml, andattachments(file URIs from inside your app). -
Open a prefilled text the same way:
import * as SMS from "expo-sms"; export async function textInvite(phone: string) { if (!(await SMS.isAvailableAsync())) return false; const { result } = await SMS.sendSMSAsync( [phone], "Join me on the app: https://example.com/invite", ); return result; } -
Show a fallback when either returns
false, such as the address or invite link with a copy button, so the button still does something on a tablet without a SIM or a phone without a mail account.
When you need to send automatically
A receipt, a reminder, or a code sent after sign-up shouldn’t wait for the user to tap send, and these modules can’t send without them. So for messages like those, your backend calls an email API such as Resend, or an SMS API such as Twilio, and the app just asks the backend to send. Supabase has a guide to sending email with Resend from an Edge Function. Keep the API key on the server, because a key bundled into your app can be pulled out of it and used to send messages on your account.
How you know it works
On a real phone, tapping each button opens the mail or messages screen with the recipient, subject, and message filled in, and sending works like any other message. We’d treat the returned status as a hint rather than proof of delivery, especially on Android.
If nothing opens
Test on a device, since neither module works in the iOS Simulator. On iOS, check that an account is set up in the Mail app, because isAvailableAsync returns false without one, and a device management profile that blocks outgoing mail does the same. On web, expo-sms isn’t supported, while expo-mail-composer’s isAvailableAsync always returns true in the browser.
Ask the agent
If your app is in Draftbit, paste this into the agent, and it can read your code and make the change for you.
Add a Contact us button that opens a prefilled email to our support address with expo-mail-composer, and an Invite a friend button that opens a prefilled text with expo-sms. If the phone can't send either one, show the address or link so people can copy it.