Email-to-SMS Gateway service from Text Marketer

Please note that this blog page has been superseded with http://www.textmarketer.co.uk/developers/sms-email-gateway.htm 
Our email-to-SMS service provides a simple way for you to send text messages via email.

This is in addition to our simple HTTP SMS Gateway API, explained here, and we also provide a more complex ‘RESTful’ SMS API to send SMS messages and give you access to information about your SMS marketing account (don’t have one? You need to have an account).

There are 3 main ways to use the email to SMS gateway;
Option 1 – To send single emails/messages using domain authentication
Option 2 – To send single emails/messages using username/password authentication
Option 3 – To send messages to multiple recipients with a single email (and advanced features)

Option 1 – Send single emails/messages using domain authentication

This option is used when you cannot or do not want to transmit your username and password in the subject field of the email. You set your sending domain in your account, e.g. mycompanyname.com which is what we use for validation when the email comes in. Only emails sent from the domain you set will be accepted (no generic email accounts likeHotmaill or Gmail are acceptable).

Step 1 – enable domain authentication in your Text Marketer account. Go to Main Menu in Message box, Account Settings, Account details tab.
Under “Email Gateway Settings” enter your domain name (e.g. if your email address was richard@greens.com then your domain name is greens.com) in the field and press Active (do not include the @ sign). Make sure Message termination is also Active. Then click Save.

Step 2 – now you are ready to send a test message. Format the email address as [mobilenumber]@textmarketer.biz (for example, 447777111999@textmarketer.biz) and send it to our gateway. Make sure you add ## to the end of the text in the body you want to send (this tells our system that this is the end of the text to send out and avoids sending things like signatures etc). You can change the message termination string by logging into your account and navigating to Account settings, Account details tab, email gateway settings.

You don’t have to put anything in the subject line as it’s not used. Below is an example using domain authentication and sending to a single recipient.

Option 2 – To send single emails/messages using username/password authentication

This option is exactly the same as option 1 apart from you do not need to turn on domain authentication in your account and instead you use your API username and password in the subject field (formed like username%password) of the email for authentication. You can find your API username and password in your account within  ‘Account Settings’ – API config tab.

So your email would look like this:

Option 3 – To send messages to multiple recipients with a single email (and advanced features)

fullscreen-capture-01072010-143626bmp
1. Create an email to the address shown above
IMPORTANT: this must be the gateway[at]textmarketer.co.uk address, not a [number]@ style address or it will fail.
2. Put your API username and password in the subject field with a % symbol in between (no spaces). You can find your API username and password in your  account within Account settings’ – API config tab. but it is usually the same unless you’ve updated your login details.

3. Type the text message you want to send and at the end put two hash symbols “##”

4. Put 1 or many numbers in a single column underneath (it’s always best in international format but UK numbers starting 07…… are OK too).

5. Send the email!

Expanded Instructions / Additional Features
The Email-to-SMS (or email-to-text-message) service allows you to send SMS text messages via email. You must have an SMS marketing account (you can create a free account here) to send text messages via this service.

The actual email address of the email-to-SMS gateway is shown in the screenshot above (gateway@ and the domain is textmarketer.co.uk).

To send a text message to one or more mobile numbers, you will specify the message to send, and the numbers to send to, in an email. You then send the email to our email-to-sms gateway email address (using a specific format/structure).

Let’s say you want to send a text message containing ‘Call us for a quote’ to the UK mobile number 07777123456. To do this your email contents would look like this:

Call us for a quote##
07777123456

The ‘##’ characters simply tell us that this is the end of the message to be sent. And it’s followed by the mobile number. That’s it!

IDENTIFICATION
Your email will contain your account’s API username and password in the email subject. This allows us to verify your identity and deduct credits for the text messages sent from your account.

Your email subject should contain your API username, followed by ‘%’, followed by your API password (You can find your API username and password in your account within Account Settings > API config tab.), e.g.

myAPIusername%myAPIpassword

Example

So the complete email (subject and body) would look like this:
Email Subject:

myAPIusername%myAPIpassword

Email Body/Contents:

Call us for a quote##
07777123456

MULTIPLE RECIPIENTS

You want to send a text message via email to more than one mobile number? No problem! Simply list the numbers on separate lines, like this:

Call us for a quote##
07777123456
07777123457

Or put them on the same line, with commas in between to separate the numbers, like this:

Call us for a quote##
07777123456,07777123457

Or you can type the recipients numbers directly into the address bar, like this:

07777123456@textmarketer.biz;07777123457@textmarketer.biz

MESSAGE WITH MULTIPLE LINES

A message sent using the email-to-SMS gateway can contain more than more line. Simply ensure the message still ends with ‘##’, e.g.:

Special offer this week on:
- black tights
- green shoes##
07777123456

FROM/SENDER ID

The sender ID is the number/name that your text message will appear as being sent from. When using the email-to-text API this defaults to the sender ID that is set in your account settings (see the ‘Send SMS’ > ‘Default Sender ID’ page). For example, you might want to set the sender ID as the name of your business, or perhaps to your own mobile number.

The sender ID can be any 16-digit number, or any text of up to 11 alpha-numeric characters.

Example
Let’s say you want to send the message ‘Special 2-for-1 offer this week’ to the UK mobile number 07777123456, with a sender ID of ‘Fast Pizzas’. Your email body (contents) would look like this:

Special 2-for-1 offer this week##
Fast Pizzas#
07777123456

The sender ID is ‘terminated’, i.e. ends with, a single ‘#’ character. It can appear before or after the message, so this works too:

Fast Pizzas#
Special 2-for-1 offer this week##
07777123456

ERROR REPORTING

If your email-to-SMS request is successful, with no errors or problems, you will not get any response (unless you’re using the Sandbox service). However, if there are any problems with the format of your email, or problems sending to any of the numbers you specify in the email, you will get a verbose email response with details of the problem(s) encountered.

Note that you will not get any response if your API username or password (included in the email subject) were incorrect, or did not contain the ‘%’ character to separate them.

TESTING/SANDBOX
If you want to test the service without actually sending any text messages, there is a different email address to use for this purpose:
gateway-sandbox@ followed by the same domain: textmarketer.co.uk

It works in the same way as the normal service, except that no text messages will be sent and therefore no credit will be deducted from your account. Also, unlike the normal service, you will get a confirmation email telling you what message would have been sent, and to what numbers, if you had used the normal live service.