469,270 Members | 1,117 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,270 developers. It's quick & easy.

Sending SMS using PERL scripts

Hi,
This time I am working on PERL. I want to send SMS alert using my perl script.
Can i do this. If yes then how?
Oct 9 '06 #1
6 30588
miller
1,089 Expert 1GB
Yes, send your phone an email in sms format.

You can use any of the CPAN modules for sending emails. My personal preference is for Net::SMTP and MIME::Lite

http://search.cpan.org/~gbarr/libnet-1.19/Net/SMTP.pm
http://search.cpan.org/~yves/MIME-Lite-3.01/lib/MIME/Lite.pm

Only things you should note are to be sure to set your mine type to

'Type' => 'text/plain; charset="iso-8859-1"',

And also to limit the size of your sms to 150 characters otherwise it will span messages.
Oct 10 '06 #2
Yes, send your phone an email in sms format.

You can use any of the CPAN modules for sending emails. My personal preference is for Net::SMTP and MIME::Lite

http://search.cpan.org/~gbarr/libnet-1.19/Net/SMTP.pm
http://search.cpan.org/~yves/MIME-Lite-3.01/lib/MIME/Lite.pm

Only things you should note are to be sure to set your mine type to

'Type' => 'text/plain; charset="iso-8859-1"',

And also to limit the size of your sms to 150 characters otherwise it will span messages.
You can also try this web URL
http://www.esendex.com/uk/products-sms-sdk-perl-sms-sdk.aspx
or
below URL
http://search.cpan.org/~eim/WWW-SMS-0.09/lib/WWW/SMS.pm
Oct 11 '06 #3
geek491
21
Hi,
This time I am working on PERL. I want to send SMS alert using my perl script.
Can i do this. If yes then how?

To send sms you need a gateway that is willing to accept your message and dispatch to the respective networks. For this you need to register and stuff which is a tedious process.

What i do is.... send an sms from email. That way you can send sms to any mobile in india with the help a email which is sent to mobile carriers.

But first you need to have a mail server ready to send mails. you also need to install the Mail::SendEasy module in perl.

use Mail::SendEasy ;

my $mail = new Mail::SendEasy(
smtp => 'mail server adddress' ,
user => 'user name' ,
pass => password ,
) ;

my $status = $mail->send(
from => 'abc@abc.com' ,
from_title => 'hi' ,
reply => 'abc@abc.com' ,
error => 'abc@abc.com' ,
to => '9845111111@airtelkk.com' ,
cc => '' ,
subject => "TEST" ,
msg => "hi" ,
html => "<b>The HTML Msg...</b>",
msgid => "0101" ,
) ;

if (!$status) { print $mail->error ;}

The above script will send a sms to 9845111111 which falls inside airtell network.

But you will only be able to send 2 sms this is because they wont spam sms to be sent using this method.

The disadvatage of this is that the text will be converted to its respective ascii equivalent and sent to the mobile...so i am not sure how to handle that.


you can find the mail ids of the mobile networks here
http://www.funsms.net/freesms2india.htm

Hutch has disabled this feature.


Let me know on how it helped to geek491@yahoo.co.in
Oct 13 '06 #4
almost all SMS devices are available at:
nnnnnnnnnn@teleflip.com
where nnnnnnnnn is the 10 digit phone number. This is a great, free gateway.

There is more complex code out there, for example http://www.enotz.com allows forwarding of eMail to your SMS device and they do not use teleflip but the individual gareway for each provider.

There are a couple of providers, the one I know of being cricket, that do not provide a gateway.
Oct 15 '06 #5
Hey check this out,
Perl Script to send SMS
(Only works for numbers in INDIA)
Dec 3 '09 #6
numberwhun
3,503 Expert Mod 2GB
@Sweetypie: Please, please, please...... look at the age of the posts you are reading. The last comment on this one was about 2-3 years ago. I doubt the OP is even working on this anymore.

Regards,

Jeff
Dec 3 '09 #7

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by noone | last post: by
6 posts views Thread by francescomoi | last post: by
121 posts views Thread by typingcat | last post: by
12 posts views Thread by rurpy | last post: by
31 posts views Thread by happyse27 | last post: by
reply views Thread by zhoujie | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.