I am currently working on a large project and part of the project is to send simple text message notices using PHP. Our client had looked into a number of expensive services to send simple SMS messages but most were cost prohibitive for a start-up venture.
As usual, I was not satisfied paying for something that I should be able to do on my own. So I started thinking about how the messaging systems worked and realized that we could just use the carriers built in email addresses for MMS messaging. This is a great, cost effective method for sending text messages but it does require that you know the user’s carrier for the message to be successfully delivered. In our case, we are able to ask for that in the web form which we are using to collect the user’s phone number but it may not work for every application.
Basically the solution is to send an email using the built in mail function in PHP or any common method of sending email. The email address you would send to would be the 10 digit mobile number followed by the carriers specific email address. (A list is included below)
Email addresses for the primary U.S. based cell phone carriers:
Alltel = firstname.lastname@example.org
AT&T = email@example.com or firstname.lastname@example.org
Boost Mobile = email@example.com
Centennial Wireless = firstname.lastname@example.org
Einstein PCS = email@example.com
Nextel = firstname.lastname@example.org
Sprint = email@example.com or firstname.lastname@example.org
T-Mobile = email@example.com
US Cellular = firstname.lastname@example.org
Verizon Wireless = email@example.com
Virgin Mobile = firstname.lastname@example.org
The simple PHP code to send the email: