Sunday, October 17, 2010

Ubuntu server send SMS text messages to cell phone

Not sure if anyone else has wondered this, but I had a ubuntu email server and I wanted to set it up to send SMS message automatically so users on cell phones could get updates. Well, that is easy, just poin the email to:
10-digit wireless

For example
If my area code was 775 and my phone number was 111-3333 I would do:

So if I was using PHP my code would be:

$to = $phoneNumber.""; //combine phone number to send message
$subject = "Hi!";
$body = "Hi,\n\nHow are you?";
if (mail($to, $subject, $body)) {

Message successfully sent!

} else {

Message delivery failed...


No comments: