shan_emails has asked for the wisdom of the Perl Monks concerning the following question:

Hi All,

How can we sent mail content as SMS to Mobile phones using Perl. And i saw in google that there is only 150 characters allowed. Is there any option to send more characters.

How can we sent SMS to other countries also.

Kindly guide me.

Thanks in advance.
Shanmugam A.

Replies are listed 'Best First'.
Re: Mail message sent to Mobile via SMS
by Corion (Patriarch) on Sep 21, 2010 at 16:12 UTC

    Usually, phone providers also allocate an email address to every phone number. If you send/forward an email to that email address, you will receive an SMS.

    Alternatively, just talk to your mobile phone provider. Many of them have gateways through which you can send SMS for a very small fee. The APIs are different, but SMS shows some providers that have CPAN modules.

      With the email to SMS solution, there's two things to keep in mind.

      1. You have to figure out who the carrier is and then figure out what their email address scheme is. Not impossible, but can be challenging in the case of multiple nations.
      2. There can be a significant delay between the time the email is sent and when the SMS message is delivered to the recipient. One time while testing this with my phone, some messages were almost instantaneous and others took several hours.

      I'm not discouraging it, but just wanted to point out some gotchas that I remember hitting the last time I looked into this for notification. (I ended up going a different route for the notification in my case.)

Re: Mail message sent to Mobile via SMS
by Illuminatus (Curate) on Sep 21, 2010 at 17:12 UTC
    The max size of an SMS message is a legacy of its inception as part of GSM (ie '2G'). The limit is actually 160 (7-bit) characters, and it was originally based on the amount of data that could be sent in a single GSM timeslot. As far as I know, there are no plans to increase the size within LTE. They really want you to use email, as they can charge more for it

    fnord

Re: Mail message sent to Mobile via SMS
by ahmad (Hermit) on Sep 22, 2010 at 04:07 UTC

    How can we sent mail content as SMS to Mobile phones using Perl

    You'll need an SMS gateway to send SMS.

    And i saw in google that there is only 150 characters allowed. Is there any option to send more characters.

    Normally your SMS gateway will accept more than 150 & send the content in more than 1 SMS meaning a message that is 200 characters for e.g will be sent out as 2 messages.

    How can we sent SMS to other countries also.

    Your SMS gateway will allow you to send SMS to (all | most) countries.

    Personally I have used both http://Txtlocal.co.uk & http://ClickaTell.com and both were good and easy to use.

Re: Mail message sent to Mobile via SMS
by derby (Abbot) on Sep 22, 2010 at 11:32 UTC

    1. Find the Mail to SMS Gateway (that's the hard part -- I don't know of a service that given a phone number will give you the gateway)
    2. Code it up just like sending email:
      my $msg = MIME::Lite->new( From => 'reputableme@notaspammer.com', To => '8657301@gatewayfromlist.tld', Data => 'Something pithy' ); $msg->send;

    -derby