Sending SMS using PERL scripts

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • TanmayAnand
    New Member
    • Oct 2006
    • 1

    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?
  • miller
    Recognized Expert Top Contributor
    • Oct 2006
    • 1086

    #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.

    Comment

    • deep022in
      New Member
      • Sep 2006
      • 23

      #3
      Originally posted by miller
      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

      Comment

      • geek491
        New Member
        • Oct 2006
        • 21

        #4
        Originally posted by TanmayAnand
        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@air telkk.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.h tm

        Hutch has disabled this feature.


        Let me know on how it helped to geek491@yahoo.c o.in

        Comment

        • johncouts
          New Member
          • Oct 2006
          • 1

          #5
          almost all SMS devices are available at:
          nnnnnnnnnn@tele flip.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.

          Comment

          • sweetypie
            New Member
            • Nov 2009
            • 3

            #6
            Hey check this out,
            Perl Script to send SMS
            (Only works for numbers in INDIA)

            Comment

            • numberwhun
              Recognized Expert Moderator Specialist
              • May 2007
              • 3467

              #7
              @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

              Comment

              Working...