- Simplified Chinese
- Traditional Chinese
Email to SMS is an object-oriented PHP library for sending text messages using the email-to-SMS gateways that carriers provide.
It’s important to understand that Email to SMS is a library, not an application, which means that it doesn’t do anything on its own. Instead, it works as a third-party component for your existing application or website, allowing you to send text messages from your code.
Sending messages with Email to SMS is free (although recipients may be charged by their carrier as with normal text messages), but be aware of a few drawbacks compared to paid services like Clickatell, Tropo, and Twilio. Messages you send will come from your email address, not your phone number. You may also be limited to less than 160 characters, depending on the carrier. Finally, due to the nature of email-to-SMS (messages are sent as emails to the carrier’s gateway, which resends them as text messages) this method can be somewhat unreliable.
If you are looking to send text messages to yourself or to a few people, this is certainly a good option to consider. However, I do not recommend using this library to send bulk messages to tens or hundreds of people.
- Send text messages to multiple recipients at once
- Send images (and potentially other files) as attachments to MMS messages (limited support)
Important: It seems that most carriers outside of North America do not actually work because they no longer have email-to-SMS gateways in place, so I can only officially support the United States and Canada. Carriers in other countries may still be included with the library, but I can make no guarantee that they will work. If you’d like to try some of them, feel free to use the demo to see if they work for you, but again, please understand that I am only including them as a convenience and am not supporting them.
I also cannot guarantee that all of the listed carriers work perfectly or at all. Whether each carrier accepts messages to their email-to-SMS gateway is entirely out of my control and can stop working at any time. Try the demo if you would like to confirm that a certain one still works. Please understand that if a carrier is no longer working, there is most likely nothing I can do to fix it.
- 7-Eleven SpeakOut
- Alaska Communications Systems
- Alltel ~
- AT&T ~
- Bluegrass Cellular
- Boost Mobile ~
- Cellular South
- Centennial Wireless ~
- Cincinnati Bell ~
- Cricket ~
- i wireless ~
- Illinois Valley Cellular
- Long Lines
- MetroPCS ~
- Mobi PCS
- Page Plus ~
- Qwest Wireless ~
- Sprint ~
- Straight Talk ~
- T-Mobile ~
- Thumb Cellular
- Tracfone ~
- U.S. Cellular ~
- Verizon Wireless ~
- Virgin Mobile ~
- Bell ~
- Fido ~
- Koodo Mobile
- President’s Choice Telecom
- Solo Mobile
- Telus ~
- Virgin Mobile ~
Carriers marked with a tilda ~ support MMS.
MMS is only supported for carriers that have an email-to-MMS gateway. If you would like to confirm that MMS is supported for your carrier, try the demo.
Also Important: Please understand that I cannot make any guarantees about how well sending images in MMS messages will work. The feature should be considered experimental, and frankly it probably won’t ever get better than it is now. Please be sure to try the demo to get some idea of how it will work for your carrier, if at all. Supporting MMS is dependent entirely on the carrier’s email-to-MMS gateway.
Demo (Live Preview) Source Code
Quite a few people have been emailing me asking for the source code to the demo, which I have been happy to give them. To make it more convenient, I have now posted it publicly for anyone to download. (It does not include the Email to SMS library itself, and you will of course still need to purchase that for the demo source code to be of any use.) To download the source code, go to the demo (Live Preview), and you will find instructions at the bottom of the page.
Email to SMS was created for PHP 5.3+ since it makes use of namespaces, but a special version of the library for older versions of PHP is also included that works exactly the same; the only real difference is the class names and the lack of namespaces in the latter version. Documentation is included for both versions.
Questions, Comments, Complaints
If you have any questions, comments, or complaints, I ask that you please bring them up with me before leaving a bad rating. I will make every effort to help you and provide a fix if there’s a problem with the library. The best way to get in touch with me is to send me an email via my profile page.
14 May 11
6 February 12
PHP 5.0 - 5.2, PHP 5.3, PHP 5.4, PHP 5.5, PHP 5.6