MMail: E-Mailing SMS messages

You can easily send a SMS message by sending a special e-mail message to a SMS Gateway.
In fact, many SMS Gateway support conversion of e-mail messages to SMS messages.

Some mobile carriers may offer free Email-To SMS gateways which can be used to forward simple text emails to a mobile phones. See these pages:

If you do not find any free Email-To SMS gateway, you may look for some fee Email-To SMS gateway. Fee gateways usually provide you with a user-ID and a password to be specified on your e-mail message. They also provide you with a small number of free SMS to be used for initial testing.

The way your e-mail message should be formatted depends on the requirements of the Email-To SMS gateway, and you should carefully look for them.

One obvious requirement (that no one ever mentions) is that, in the e-mail message, the SMS text must always be preceded by two CarriageReturnLineFeed strings (x'0D25'). This is the standard delimiter used both in HTML and in mail messages to signal the end of the script headers or EOH (In mail messages, standard headers are: FROM, TO, SUBJECT, REPLY-TO, etc.).

The trouble with Email-To SMS gateways is that you have to write your own program to generate an e-mail message complying with the standards requested by your favorite SMS gateway. However, that is not too difficult, if you make use of some existing subprocedures provided in service program MMAIL/SENDMAIL.

MMAIL provides a number of programs for some fee Email-To SMS gateways.
Looking at the sources and at the related gateway requirements, you may easily understand how things may made work for a similar case.

MMAIL provided utilities to interface fee Email-To SMS gateways:

  1. E-mail SMS message to gateway Clickatell.com
  2. E-mail SMS message to gateway SubitoSMS.it

Note -Shlould you need a different command/program to e-mail messages to another SMS gateway of your choice, just let us know: we can provide you with what you ask - for a few USD dollars - in a very short time.



1. E-mail SMS message to gateway Clickatell.com

When you register on SMS gateway Clickatell, you specify your desired user-name user-name and receive a password and an account-ID.
Subsequently you must ask for a SMTP Api-ID.

In this case the e-mail message generating an SMS message should be

  • built as follow:
    mail-message
    headers
    two x'0D25'
    (EOH End-Of-Headers)
    mail-message
    body
    User: Clickatell provided User-Name
    Password: Clickatell provided Account-Password
    Api_ID: Clickatell provided API_ID
    To: To-Mobile number
    Reply: e-mail address of the Sender
    Text: The text that must appear in the received SMS message (160 char max.)
  • sent to sms@messaging.clickatell.com

Command MMAIL/EMLSMS1 provides exactly the above e-mail message and sends it to sms@messaging.clickatell.com:
EMLSMS1 FROMADDR('e-mail address of the Sender')
USER('your_User-Name')
PASSWORD('Clickatell_provided_Account-Password')
API_ID('Clickatell_provided_API_ID')
TOMOBILE(To-Mobile number)
TEXT('The text that must appear in the received SMS message (160 char max.)')




2. E-mail SMS message to gateway SubitoSMS.it

When you register on SMS gateway SubitoSMS.it, you specify your desired user-name and receive a password.

In this case the e-mail message generating an SMS message should be

  • built as follow:
    mail-message
    headers
    To: To-Mobile number@invia.subitosms.it
    Subject: your_User-Name  vendor_provided_password
    two x'0D25'(EOH End-Of-Headers)
    mail-message
    body
    The text that must appear in the received SMS message (160 char max.)
  • sent to To-Mobile number@invia.subitosms.it

You may use command MMAIL/EMLSMSIT1 to build and send such an e-mail message:
EMLSMSIT1 FROMADDR('e-mail address of the Sender')
TOADDR('To-Mobile number@invia.subitosms.it')
SUBJECT(' your_User-Name  vendor_provided_password')
TEXT('The text that must appear in the received SMS message (160 char max.)')