Email-to-SMS Gateway List With Setup & Code Example

Posted on 2018/04/18 at 5:52 pm

Email with Arrow Pointing to SMS

For personnel projects, one might need to send a message to a phone to give updates or alerts. This can be done relatively easily by using PHP and its "mail()" command. But, we need to know what gateway to send it to and what the number is. The number part is easy but gateways vary. So, here is a reference list of Email-to-SMS Gateways. In addition, there is a quick code reference part to help get the ball rolling. As a final point before starting, you will need a proper mailing system and FQDN to make sure messages get through. Some gateways are highly fickle and you might not always get the SMS sent through using this setup. So, don't use this in a commercial context unless you do the aforementioned.

Code Reference:

First, you'll need the program "mail()" uses to send messages. In a terminal do:

sudo apt-get install sendmail

Then, edit the host file found at /etc/hosts. You'll have something like this at the top: localhost. You need it to be setup the proper FQDN syntax; so, something like this: is needed. After all that is setup (You might need to reboot.) you simply need to insert into a PHP script the following:

$number   = "[email protected]";
$subject  = "Your sybject message here.";         // Not used in text messages per say
$tmessage = wordwrap("Your message here.", 70 );

mail($number, $subject, $tmessage);

Gateway List:

Cell Carrier Email Domain
AT&T Enterprise Paging
AT&T Wireless
Alaska Communication Systems
Alltel Now part of AT&T
Australia T-Mobile/Optus Zoo (Optus) Appears they charge for the service
Bell Mobility & Solo Mobile
Bluegrass Cellular
Boost Mobile
Cellular South (C Spire) (now
Centennial Wireless
Cincinnati Bell
Cingular Merged with AT&T Mobility 2007
Cingular Prepaid
Cox Wireless Discontinued 2012
Cricket Wireless
Digicel St. Lucia
Google Voice Not an actual carrier
GCI Alask Digitel (GCI)
IV Cellular (Illinois Valley Cellular)
i wireless (iWireless) (T-Mobile) (Sprint PCS)
Koodo Mobile
Metro PCS
Mobilicity No email-to-SMS service
MTS Mobility
NET10 Determine NET10's carrier
nTelos Will change to Sprint early 2016
O2 (M-mail)
O2 Powered Networks  
Optus Appears they charge for the service
PC Telecom
PTel Mobile
Pioneer Cellular
Pocket Wireless
Republic Wireless
Rogers Wireless
Straight Talk Determine Straight Talk's carrier
Syringa Wireless
T-Mobile UK
Telus Mobility
Tracfone Determine Tracfone's carrier
US Cellular
Virgin Mobile
Virgin Mobile Canada
Virgin Mobile UK
Vodafone No email-to-SMS service
Wind Mobile

Check out my article regarding Quick Test Servers so you can test this out properly!

To Top

To Bottom