Yii2-Sms ¶
Yii2-Sms sends free messages using Swift Mail
Documentation ¶
Installation ¶
This document will guide you through the process of installing Yii2-Sms using composer.
Download using composer ¶
Add Yii2-Sms to the require section of your composer.json file:
{
"require": {
"abhi1693/yii2-sms": "2.0.0"
}
}
And run following command to download extension using composer:
$ php composer.phar update
Basic Usage ¶
Valid Carriers ¶
- AT&T
- Boost Mobile
- Cingular
- Metro PCS
- Nextel
- Sprint
- T-Mobile
- Verizon
- Virgin Mobile
Usage ¶
$sms = new Sms();
$sms->transportType = 'php'; // php/smtp
$sms->transportOptions = [
'host' => 'smtp.gmail.com' // Other domains can also be used
'username' => 'your@gmail.com',
'password' => '******',
'port' => '465',
'encryption' => 'ssl'
];
$carrier = "T-Mobile";
$number = "0123456789";
$subject = "Subject";
$message = "Message";
$sms->send($carrier, $number, $subject, $message);
"Yii2-Sms sends free messages using Swift Mail"
Why it should be free? Anyone has to pay for the sms!
OMG
Absolutely not working. Wrong docs. Exceptions on every steps.
Yii2-Sms sends free messages using Swift Mail
@mitchobrian
It sends a mail to the mentioned gateways. These gateways are free services, so no one has to pay for it.
Fixed Exceptions
@zelenin
I have fixed the documentation and other major bugs. Report any other bugs that you find.
Thank you.
Yii2-Sms sends free messages using Swift Mail
@Abhimanyu Saharan
These services needs a registration before! Afterwards you can add credit to your account to send sms from YOUR mail address for the given rates.
That's not a FREE service!
btw. you should delete your credentials of your mail account from the github source mortifying!
Yii2-Sms sends free messages using Swift Mail
@mitchobrian
I don't know about you but I was able to send free messages to my friends. And thank you for pointing out my silly mistake :P
It should be free
This extension uses the carrier's email to sms text functionality. The recipient can disable it on their account though for some carriers. However most carriers allow for this type of "SMS Texting" when in reality is it not sms to sms. Here is a link to the AT&T support docs on this function.
http://www.att.com/esupport/article.jsp?sid=KB92125&cv=820
Other carriers have the same documentation and support.
@slvolz
What means, that it do not work out of the box. You need to be registered with your mobile device and your number to such services to enable sms delivery to you. There is no way to text sms through the world to any mobile number you like to for free!
If you have any questions, please ask in the forum instead.
Signup or Login in order to comment.