For the complete documentation index, see llms.txt. This page is also available as Markdown.

πŸ“§SMS/Email

Open the device's native SMS or email composer with pre-filled content directly from your app.

What are native SMS/Email?

The SMS / Email feature opens the device's native messaging or mail composer, pre-filled with the content you provide. The user can review and edit the message before sending - your app doesn't send anything automatically.

This is useful for sharing order confirmations, referral links, support requests, or any other content the user might want to send via SMS or email without leaving the app flow entirely.

Native Email and SMS composers on iOS (similar on Android)

Prerequisites

Implementation

Choose your integration method below: Bubble.io Plugin (No-Code), JavaScript SDK (Code), or AI Agents (for AI-powered editors like Lovable, Base44, and Replit).

Initialization

Check Plugin

Before starting, verify if the Natively plugin is already installed in your Bubble project.

  1. Open your Bubble editor and navigate to the Plugins tab in the left sidebar.

  2. Check Installed Plugins: Look through your list of installed plugins for "Natively iOS & Android app builder".

    • If it IS installed: Check the version number. If an update is available (e.g., you see a button saying "Update"), click it to ensure you have the latest features and bug fixes.

  • If it is NOT installed: Click the + Add plugins button, search for "Natively", and click Install.

Setup Logic

All fields are optional. Any fields left empty can be filled in manually by the user in the composer.

[Element] Natively - SMS/Email

Events:

  • SMS action is not allowed [iOS] - fires when the user has restricted SMS sending for other apps.

  • SMS sent [iOS] - fires when the SMS was successfully sent.

  • SMS sending failed [iOS] - fires when the SMS failed to send.

  • SMS sending cancelled [iOS] - fires when the SMS composer was closed without sending.

  • Email action is not allowed [iOS] - fires when the user has restricted email sending for other apps.

  • Email sent [iOS] - fires when the email was successfully sent.

  • Email sending failed [iOS] - fires when the email failed to send.

  • Email saved [iOS] - fires when the user saved the email as a draft.

  • Email sending cancelled [iOS] - fires when the email composer was closed without sending.

Actions:

  • Send SMS - opens the native SMS composer:

    • Recipient - phone number to pre-fill. If left empty, a contact selector will open.

    • Body - the message text to pre-fill.

  • Send Email - opens the native email composer:

    • Subject - the email subject to pre-fill.

    • Recipient - email address to pre-fill.

    • Body - the email body to pre-fill.

How to use

Pre-fill as much as possible

The more you pre-fill, the less friction for the user. At minimum, pre-fill the recipient and body - a user who just needs to tap send is more likely to complete the action than one who has to type everything manually.

Leave fields empty when appropriate

If you don't know the recipient upfront - for example, when the user wants to share something with a contact of their choice - leave the recipient empty. For SMS, this opens a contact selector; for email, it opens a blank composer.

Handle callback statuses carefully on Android

On Android, the callback always returns SENT for email and SMS SENT! for SMS, regardless of what actually happened - the user may have cancelled, or the message may have failed. Do not rely on the Android callback status to confirm delivery. On iOS, the statuses are accurate and can be used to trigger follow-up logic.

SAVED status on iOS email

If resp.status returns SAVED, the user saved the email as a draft rather than sending it. Handle this case in your callback if your flow depends on the email being sent.

No sending without user confirmation

The feature always opens the native composer - your app never sends SMS or email automatically. The user must tap send themselves.

Troubleshooting

The SMS or email composer is not opening

Make sure the feature is triggered from a user interaction - like a button tap - rather than automatically on page load. Also, verify the SDK is fully loaded before calling the method.

NOT_ALLOWED status on iOS

The user has restricted the app from sending SMS or email in their device settings. This is a user-controlled permission - you can prompt them to go to Settings β†’ [Your App] β†’ Allow Sending to re-enable it.

Android callback always returns SENT or SMS SENT!

This is expected behavior on Android - the callback status does not reflect the actual outcome. Do not rely on Android callback status to confirm whether the message was sent, cancelled, or failed.

Multiple recipients are not working

Multiple recipients are confirmed to work on Android by separating with , or ;. If you are experiencing issues on iOS, test with a single recipient first - multiple recipient behavior on iOS has not been fully confirmed.

The email composer opens, but no email client is installed

On some Android devices, if no email client is installed, the composer will not open. This is a device-level limitation - consider showing a fallback message if your audience includes users who may not have an email app configured.

Last updated