The "Sending free SMS online" cookbook - Part 2
Background
This article is the 2nd post in a 5 series cookbook on build a "send free sms" website. In the first post 1 we explained why there is a huge interest in having a website that allows people to send free SMS. We also explained the basics behind some of these free sites and explained to you that you should not pay big money for scripts that send free sms.
In this article, we will explain in more detail about the gateways that are provided by the phone companies and how you can use these to build your own sms sending website.
Phone Company Email to SMS Gateways
In the first article we explained that most of the "send free sms" websites out there actually use a simple mechanism of sending an email with the text message to a phone companies email to sms gateway. There are some drawbacks as described in the first post but I wont go into that in this post.
Example of a free phone company email to SMS gateway
The following is an example of the Cingular Wireless SMS gateway:
10digitphonenumber@mycingular.textmsg.com
Here you will see that you need to send an email to an email address that contains a 10 digit phone number and the mycingular.textmsg.com domain. In this case you make the from email address the number that you want to come through as the sender. The body of the email should contain the actual text/SMS message
Send to an email to an Email to SMS gateway
The simplest way to try it is by just sending an email from your gmail or mail account to the Mobile Email of your friend and it will SMSed to your friend mobile phone.
But if you want to send an email from your script just use a scripting language such as PHP or Perl. Heres an example of some code to send the email using PHP
function send_mail($args) {
$to = $args['to'];
$subject = $args['to']. $args['subject'];
$message = $args['body'];
$headers = "'From: ".$args['from']."'\r\n" .
"'Reply-To: ".$args['from']. "'\r\n" .
'X-Mailer: PHP/' . phpversion();
mail($to, $subject, $message, NULL, "-f".$args['from']."@noreply.com");
}
List of Phone Companies Email to SMS gateways
The following is a list of email to SMS gateways provided by the operators.
http://en.wikipedia.org/wiki/SMS_gateways#Email_to_SMS_.2F_Web_to_SMS
Be Cautious using this method
You need to be aware that this list may get out of date if operators change their gateways. So you will need to use caution when using this method of delivering SMS.
Also, some phone companies want different number formats in the email addresses. Some want you to put the full international dialing format while others only want the number in local format. Some phone companies even want you post to a webform instead of sending an email.
In the next part of this 5 series cookbook on build a "send free sms" website I will explain how you can add some intelligence to improve the success of sending to email to SMS gateways.
blog
Me2mobile welcomes new owner
Feb-20-2010
comments (0)
Me2mobile founders moving on!
Feb-08-2010
comments (0)
Happy New Year to all me2mobilers
Jan-06-2010
comments (0)
Your Christmas Gift - Happy Holidays
Dec-23-2009
comments (0)
New webtext service on me2mobile
Dec-16-2009
comments (0)
Texting fish in New York
Sep-29-2009
comments (0)
Twittering passengers alert to ferry delays
Sep-17-2009
comments (0)
The Joy of Text for Irish businesses
Jul-15-2009
comments (0)
Like seeing in the dark
Jul-03-2009
comments (0)
Hello World
Jun-15-2009
comments (1)
