gmail to sms from my application - php

Does anyone know how can i send a sms messsage when e-mails are arriving in a gmail account?
I know some PHP, C/C++ and C#, and I plan to read the new message using POP3. The problem is that I don't know how can I send a SMS message to a mobile phone. Do I need a SMS server?
can you give me some advices?

you need to register with and buy credit at some bulk SMS gateway with API. personally, i would recommend: http://www.clickatell.com/
which allows to send SMS via email, HTTP/GET/POST, REST, XML etc.

Many cell carriers have the ability to send SMS messages to an email address (ie yourphonenumber#telus.com). If you're sending to a specific mobile phone (for keeping an eye on your website, say), this would be something to look into, because it's free and simple. For the general case of sending an SMS to any mobile phone, that's somewhat more complicated. You can either hook into an SMS gateway (such as clickatell, as dusoft mentions), or you can attach a GSM modem to your PC and send commands through it.

Related

What are requirements for sending and receiving sms using php?

I want to develop a website that sends and receives messages to a huge number of mobile phones in different country. The system is developed using PHP, My question is that: What requirements(i.e configuration in php) are needed from the carrier that messages are sending and receiving via it? How many numbers are needed for this purpose if the distinction numbers are too many? Is bulk id can be used for one number to send sms for a large numbers?
You need to get an account with SMS gateway providers. SMS gateway sits between your website and the mobile network's short message service center and sends/receives SMS. This is the easy way to do this becuase these gateways can proveide choices of protocals such as HTTP, SMTP, SMPP and Web services.
There will probably be cost involved with using these gateways and number (bulk) of SMS you can send depends on the kind of account you have with these gateways.
Few exampls of such gateways are Twilio, Clickatell, bulksms etc.

Force SMS messages sent from static email address to use the same number (AT&T example)

This specific example is using AT&T as the carrier of the receiver.
When sending SMS messages to clients via their carrier email address (1234567890#txt.att.net) from a static email address, the messages arrive on the phone from a number in the format of 1 (400) 000-244. Every time a new SMS message is sent, that number changes slightly. This causes phones, such as the iPhone, from properly threading the SMS messages that are coming from the same source email address.
Basic research shows that this has something to do with how AT&T's gateway handles turning emails into SMS messages. We've also looked at and decided that Common Short Codes (CSC) are not worth $1000 per month to purchase, so this is not an option for us.
Does anyone know of another way around this limitation in which it would be possible to force all SMS messages from the same source email to appear that way on the phone so that they are threaded correctly?
In our configuration, the emails are going out via SMTP using the PHP PEAR Mail_Mime package. We're really looking for a way we can do it on our end without the purchase of a shared or dedicated CSC.
Use:
<10 digit phone number>#mms.att.net
Instead of 'txt.att.net'
This will solve the short code dilemma.
For your AT&T issue they use a cluster model to send out SMS using the email gateway. To over come your problem there might be a couple of solutions but it all depends on what your needs are looks like they increment the phone number by one for each new message. Not sure how you could thread these.
Zeep Mobile lets you send SMS with a shared Short Code but they tag the end of your SMS message with ads, but the service is free (limited text per month I think)
Twilio might be a good cheap alternative as they offer such services. No short code but I believe they use the same From number for your threading issue.
Using your own GSM Modem could be an option but there is some work on getting this to work properly. Also it uses a Long Code (Think telephone number) instead of a Short Code.
There are a couple of other solutions so I will update my answer soon.
UPDATE:
Tropo
Google Voice

sms through php from any no

I know I can send sms through php using api or gateway.
But my question is how those websites send sms through our mobile no. How is this done.
Any help
SMS is fundamentally like email, it trusts the sender to be truthful about who they are sending from. I use clickatell to send SMS and in the early days - 2004/5 you could send an sms to anyone from anyone without any special permission, but they quickly shut this down for security reasons, you now have to register and prove your rights to send from a particular address.
Basically in order for you to do it you need to either sign up with a mobile provider or have an agreement with your sms provider to allow you to send sms from whoever you wish. There may be senders out there who are less strict in setting the sender.
They would communicate with a provider (possibly through a third party) also using an API of sort. One of the parameters they would pass is a source number. So when the SMS is sent there is header information saying it came from a specific number. It is possible to set this value to a text string too instead of a number. So the SMS might look to come from for example 'STACKOVERFLOW' instead of '12345678'.

Web form autorespond with SMS

I have been asked to design a website for a client but one of the requirements is that there is a form which includes such things as name, email, dob and mobile number once the user submits the form a SMS is automatically sent to the users mobile almost like a autoresponder.
How to achieve this?
This can be done using an external SMS gateway which will not be free, but also not awfully expensive.
However, you say you are not a programmer. For this to be built well and most important of all, safely, it might be a good idea to use the services of one.
If you want to do it yourself, consider using a pre-paid plan with the SMS provider of your choice so you can't be ruined by a bot flooding your form with thousands of requests.
Web sms functionality can be added to any web application or website. As #Pekka said you need to use an external SMS gateway and to connect your application to this SMS Gateway. Most SMS gateways provide external API which can be used to do that. They usually have documentation which you can use to find out how to integrate SMS notification in your PHP code. Unfortunately there are no reliable free sms service provides so you have to pay for this sms service. You can check http://www.phpjabbers.com/web-sms/ which seems to work a lot easy. Their integration code is pretty simple:
<?php
$SMSLIB["phone"] = '44111222333'; // your phone number
$SMSLIB["key"] = 'abcdefghijklmnopqrs'; // your personal API code
include("smslib.php"); // we will provide you with smslib.php file
sendSMS("test message", $SMSLIB["phone"]); // function which sends the message
?>
The easiest way to do this is to send it to their mobile numbers assigned email address (which is different by each carrier) then have it sent like a normal email.
The only issue is you will probably have to have a Dropbox with each carrier then add something to the PHP that changes the email address (ex. $tmobile would be tmomail.net).
More info:
How To Send Email To Any Cell Phone (for Free)
Most of mobile carriers offer free Email To SMS gateways which can be used to forward simple text emails to a mobile phones. And the good news, majority of those gateways are free and available to the general public.

users see my SMS messages as coming from '1010100001'

In my application, I ask the user to enter their cell and select their provider. I append the provider's email and create the message and fire via php.mail()
The problem is that no matter what the header info is, the message comes from '1010100001' on some phones (like AT&T and the iPhone). When testing on my Verizon phone, I get the proper email address as the sender.
Any idea how I can send a clearer message?
Your problem is that you're not actually sending SMS messages, you're sending email messages and then trusting the carrier's email-to-sms gateway to "do the right thing."
To have better control over the SMS message, send the SMS message directly. For low volume, try Twilio SMS Service

Categories