Email to SMS
This documentation explains how to send emails to SMS and forward SMS replies to your email inbox.
Configuring Permissions
Before using Email to SMS, you must configure it to allow emails from trusted sources.
You can add full email addresses and/or a domain name.
Disposable email domains or public email domains
For domains, you cannot use a disposal or public email domain like gmail.com, yahoo.fr, ...
You can add up to 50 email addresses and up to 10 domains.
Defining how to handle emails
You can define how the received emails will be handled by the application.
Select the type of content email: Text, HTML, JSON, or XML.
Use Text to handle emails normally.
By default, we don't check for duplicates, meaning that if we receive the same email subject, body, and destination twice, we handle it as a new SMS request.
Note that some email servers can resend an email more than once. We recommend setting up the duplicate check to 2 minutes by default.
You can use a END tag to stop the parsing of the email and not send by SMS the text after the tag.
This is useful when you have an email signature, for example.
Security & Quota
Add a security layer with SPF check and a Quota of SMS per day.
SPF Check enables automatic verification of the SPF (Sender Policy Framework) for the email recipient.
You can define a quota for the allowed email addresses or domains to limit the number of SMS sent per day.
Extracting fields
You can automatically extract text from the email depending on the type of content. By using JSONPath or XMLPath for JSON or XML content.
The extracted information is saved in a variable and can be used when sending the SMS.
The following information can be used to extract text :
- Subject: The subject of the email
- Body: The body of the email
- From: The email address sending the email
- To: The destination email address containing the phone number
You can use text extraction (After and Before) to extract the text before or after a defined text, or use a REGEX for advanced extraction.
Formatting the SMS
Size of the email content and SMS
We recommend to limit the number of SMS parts to avoid unexpected costs especially if your email content is unpredictable and can be long.
Email to SMS gives you plenty of control over how the SMS is sent and its content.
Select the Sender Service to use and type the text to send. You can also limit the number of SMS parts.
You can use the Liquid Syntax and the properties of the email, including the Extracted fields, in your SMS content.
We provide, by default, a sample email you can use to test and verify your content by clicking on "Edit Sample email".
You can use the following variables in your content :
{{ email.subject }}
: Subject of the email{{ emai.body }}
: Body of the email{{ email.from }}
: The from email address{{ email.to }}
: The destination email address{{ email.received_at }}
: When the email was received{{ custom.<your_variable>}}
: To access your Extracted Field named<your_variable>
Here is a list of some examples of SMS content.
Send only the subject of the email
{{ email.subject }}
Send the body of the email
{{ email.body }}
Send all information and format the date.
from: {{email.from}}
to: {{email.to}}
at : {{email.received_at | date: "%Y-%m-%d %H:%M"}}
Subject: {{ email.subject }}
Body: {{ email.body }}
Forward SMS Replies
Optionally, you can define how SMS replies will be handled. You can send them back to the original Email to SMS sender or send them to another email address.
The configuration is similar to Email to SMS, but with a key difference: instead of accessing email data, you can use SMS data in the email body.
The following information is available :
{{ sms.from}}
: SMS origin number who sent the SMS{{ sms.to }}
: SMS destination number{{ sms.body }}
: SMS content{{ sms.received_at }}
: When the SMS was received{{ sms.id }}
: The unique ID of the SMS message{{ email.id }}
: The email ID of the initial Email
Forward SMS Status
SMS Status & Webhooks
You can configure also the Webhooks Manager to receive the SMS Statuses via HTTP requests.
If you want to receive the statuses of the sent SMS by email, you can define how to receive them.
The following information is available :
{{ sms.from}}
: SMS origin number who sent the SMS{{ sms.to }}
: SMS destination number{{ sms.status }}
: The SMS status (only final statuses are sent){{ sms.reason }}
: The SMS status reason{{ sms.sent_at }}
: When the SMS was sent{{ sms.delivered_at }}
: When the SMS was delivered{{ sms.id }}
: The unique ID of the SMS message{{ email.id }}
: The email ID of the initial Email
Sending a Message via Email to SMS
Email to SMS allows you to send and receive SMS messages directly from your email.
-
Go to your email client, e.g., Outlook, Gmail ...
-
Compose a new email
-
Enter the SMS Mobile number, followed by @naxai.email (e.g. [email protected][email protected])
-
Add the content of your message to either the subject and/or body of the email
-
Replies to the SMS will appear in both the email client inbox and also in the Naxai console.
Emails and the SMS sent are visible in the Naxai console, go to SMS, Email to SMS, and select the tab Email to SMS
Things to remember
- Make sure to configure your SMS end tags if your email includes an automatically generated signature or any additional text that you do not want to include in the SMS message.
- Even if you remove your email signature, your email client may still automatically append privacy statements or similar disclaimers at the bottom of each message.
- To avoid unintentionally sending overly long messages, it’s recommended to always use SMS end tags.
- Limit the number of SMS parts to not send accidently lengthy messages
Updated about 5 hours ago