473,382 Members | 1,302 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

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 31205
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,509 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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: noone | last post by:
Hello all, I am absolutely brand new to perl, but I understand that it is a very important aspect of web development to create dynamic web pages. I am kind of short on money, being a college...
5
by: fochie | last post by:
Greetings, I'm trying to send data to my server using xmlhttp POST. The data being sent is actually an HTML page that is built with javascript in the browser. The HTML code contains a small...
6
by: francescomoi | last post by:
Hi. My host decided to disallow mails from 'nobody' ('nobody' is the user of PHP+Apache) due to spam problems. I use the PHP mail function to send out a confirmation email for new users, and...
121
by: typingcat | last post by:
First of all, I'm an Asian and I need to input Japanese, Korean and so on. I've tried many PHP IDEs today, but almost non of them supported Unicode (UTF-8) file. I've found that the only Unicode...
12
by: rurpy | last post by:
Is there an effcient way (more so than cgi) of using Python with Microsoft IIS? Something equivalent to Perl-ISAPI?
8
by: vj | last post by:
I've been given a project which requires writing scripts that need to be run on over 3000 servers. Only about 15% of them have python installed on them. While all/most of them will have perl. ...
21
KevinADC
by: KevinADC | last post by:
Note: You may skip to the end of the article if all you want is the perl code. Introduction Uploading files from a local computer to a remote web server has many useful purposes, the most...
31
by: happyse27 | last post by:
Hi All, I am trying for weeks how to send email from windows pc, which from my gmail account to my hotmail account. Using net::smtp module sending email failed,Kindly assist. (for the item d it...
5
by: xmaverick | last post by:
Hello, I'm a newbie to perl and i'd like some assistance trying to figure out how to send an attachment using MIME::Lite. I have searched the net far and wide and have used and modify different...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.