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: //your gmail account
auth_password= ******* //your email password
force_sender=   //your gmail account

After completing this save that file.

Again open php.ini file from your server application. in case of wampserver, click the green icon of wamp server from system tray, hover over PHP and then choose php.ini file, open that file in notepad and find mail function. i.e. [mail function] inside this [mail function] find the following parameters:

sendmail_from =
sendmail_path =

set the following value to them:

sendmail_from // your gmail account
sendmail_path =”C:\wamp64\sendmail\sendmail.exe -t”

and save this php.ini file for more details you need to watch this video: CLICK HERE

After doing this, you complete the task of selecting your carrier and configurating your mail routing software. we need to configure mail routing software because we send SMS using email. Now write the following piece of code in any text editor software, i am using Dreamweaver CC and saved this php file in .php extension in your localhost and run (Note: your PHP file will not execute in the same way you run your html file, because PHP is server side scripting language so you need to have any server application to run this file.  watch this video to configure site and testing server in Dreamweaver CC: or read here: click here)

<!doctype html>
<?php if(isset($_POST['send'])){ 
$from = $_POST['femail']; 
$phoneno = $_POST['phoneno']; 
$message = $_POST['message']; 
$carrier = $_POST['carrier']; 
echo("enter the email");
}else if(empty($phoneno)){ 
echo("enter the phone no"); 
} elseif(empty($carrier)){
echo("enter the specific carrier"); 
} elseif(empty($message)){ 
echo("enter the message"); 
exit(); }else{ 
$message = wordwrap($message, 70); 
$header = $from; 
$subject = 'from submission'; 
$to = $phoneno.'@'.$carrier; 
$result = mail($to, $subject, $message, $header); 
echo("message sent to".$to); 
<meta charset="utf-8">
<title>Untitled Document</title>
<form action="smsone.php" method="post">
<table align="center">
<td><input type="email" name="femail" placeholder=""</td>
<td>Phone Number:</td>
<td><input type="text" name="phoneno" placeholder="enter 10 digit phoneno with country code"</td>
<td><input type="text" name="carrier" placeholder="enter the carrier. ex:"</td>
<td><textarea rows="6" cols="50" name="message"></textarea></td>
<td><input type="submit" value="send" name="send"</td>

May be after sending 10 SMS your credit will be finished! but don’t be sad, you can send more and more SMS but you need to create another account with another email account in! that’s it. you may not be that much happy to hear this (sending only 10 SMS) but don’t forget you are able to send these 10 SMS for free and also there is one line “To get something, you must lose something”. it means you have to spend some time in creating account in in order to send free SMS.

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:





Please enter your comment!
Please enter your name here