Skip to content

Email to/from SMS

Documentation of how to send emails to SMS and using webhooks to receive messages and have them delivered to your email inbox.

Email to SMS

To use this API, you need to whitelist one or more emails or an entire domain before you can send SMS messages.

Whitelisting emails

To whitelist emails and domains go to “Settings” “Email Whitelist”, add an email like me@example.com or an entire domain e.g. @example.com, if you want your whole organisation to be able to send messages this way.

If you whitelist @example.com no other accounts will be able to use this domain. Because of this we require addresses from webmail providers to not only be the domain, such as @gmail.com, @outlook.com, etc.

Requirements

To successfully deliver your email as a SMS you have two options for proper authentication:

  • Your whitelisted emails or domain, which need to pass SPF check and have a DKIM record.
  • You need to put an API token in the Subject field of the e-mail.

For security reasons we highly recommend option 1. Since emails in most cases are transferred unencrypted over SMTP, an attacker might be able to capture your API tokens. We do provide the second option for customers that are unable to set up SPF and DKIM for their email.

If you use an API token and you also use our IP whitelist, then you will need to whitelist the IP-address of your outgoing e-mail server as well.

Sending an SMS

Sending via the Email to SMS API is straightforward. All you need to do is send to the recipient’s phonenumbers and set a default sender.

Recipients

Sending SMS messages is as simple as sending an email to the phonenumber@smtp.gatewayapi.com, for example 4512345678@smtp.gatewayapi.com

Sender

Your sender is controlled by the default sender setting found under “Settings”, “SMS defaults”.

SMS length

SMS messages sent via this API is limited to 20 SMS parts, equal to 3 060 characters. This measure will prevent unintentionally long SMS messages, when using email clients like e.g. Gmail, where the emails are kept as conversation threads, where responding to the original email, will keep the entire conversation in the email.

SMS to Email

Receiving SMS messages from your users in your email inbox, requires you to have a virtual number attached to your account, and to use this number with a SMS to Email webhook as well.

SMS to Email Webhook

Navigate to “API” “Web Hooks” and setup a webhook of the type SMS to Email Give your webhook a name and add email addresses that should receive the SMS messages.

SMS messages will be delivered with the from address: 4512345678@smtp.gatewayapi.com.