How to Send Free SMS using PHP?[With Source Code]

4 10,037

As you all know guyz, the era that we are living is an era of internet, so everyone is hanging on their PC all the time. Everyday we are sending some SMS to our friends in order to inform something to them. So, if there is some method that can send SMS for free, everyone gonna use that method and loved it. Today, in this tutorial we are gonna discuss about that method using PHP. And also if you wanna send the message to your friends without displaying your number and name, this tutorial is for you! sometime we are in the mode of cracking jokes and wanna fool your friends or sending some threatening message(only for entertainment purpose otherwise it will be illegal) you can use this method. This method of sending SMS is called email2sms Method.

“This tutorial may be very useful for those who want to integrate SMS features in their project which is developed in PHP”.

For sending SMS using email2sms approach: you have to do three task:

1.    Selecting Carrier

2.    Configurating Mail Routing Software

3.    Writing PHP Script

we are selecting txtlocal as our carrier. So, All you have do is go to and there you need to create one account. after creating account. (you need to fill up some of your information and txtlocal will send you a verification email into your email and verify your account [watch the video for detail]) you have to hover your mouse over setting menu and click check box of active emaill2sms.

After doing this, you need to download this software having the name sendmail click here and copy the file inside your localhost root folder in my case c://wamp64/sendmail and then open that sendmail and find sendmail.ini file and open this file with notepad and  then scroll down and find following term:


Write your gmail in the place of auth_username, password to auth_password, again your gmail in force_sender, and localhost in hostname same as following:

Finally, if you guyz think, this is awesome tutorial and help you in some extend please share this tutorials with your all friend so that they can know about this method of sending SMS!

For more details watch the video: