Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: Unable to Send SMS

by rpnoble419 (Pilgrim)
on Jun 12, 2013 at 01:02 UTC ( [id://1038367]=note: print w/replies, xml ) Need Help??


in reply to Unable to Send SMS

I use the SMS::Send with the Twilio add-on. It costs me 1 cent per message, took me 9 minutes to get it up and running with 12 lines of code.

#!C:/strawberry/perl/bin/perl.exe use strict; use warnings; use SMS::Send; # Create an object. There are three required values: my $sender = SMS::Send->new('Twilio', _accountsid => 'Acount SID here', _authtoken => 'Twilio Token here', _from => '+1 Twilio Phone number here' ); # Send a message to me my $sent; eval{ $sent = $sender->send_sms( text => 'text to send', to => '+12125551212' #sample phone number ); }; my $error = $@; # Did it send? if ( $@ ) { print "Unable to send Message ".$@; }

This code is an example cut out of a larger script.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1038367]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others perusing the Monastery: (3)
As of 2024-04-19 05:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found