The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

yesssSMS - Send text messages to mobile phones through the website of yesss!

SYNOPSIS

 use yesssSMS;
 use strict;
 
 # create SMS object
 my $sms=yesssSMS->new();
 
 # login to the site with your phone number and the password
 $sms->login("06811234567","MyPassword");
 
 # check whether login was successful
 if ($sms->getLastResult!=0)
 {
        print STDERR "Error during login: ".$sms->getLastError()."\n";
 }
 
 # send a text message
 $sms->sendmessage('00436817654321','Just testing...');
 
 # check whether the message was delivered
 if ($sms->getLastResult!=0)
 {
        print STDERR "Error during sendmessage: ".
                $sms->getLastError()."\n";
 }
 
 # logout of site
 $sms->logout();
 
 # check whether login was successful
 if ($sms->getLastResult!=0)
 {
        print STDERR "Error during logout: ".$sms->getLastError()."\n";
 }

DESCRIPTION

Objects of the yesssSMS class are only able to send text messages to mobile phones through the website of yesss!. To be able to use this service, you need to have an account at yesss! (a mobile phone). The target phone number must be provided with the international code starting with 00 (e.g. 0043 for Austria). The text messages are limited to 160 characters.

This module requires following modules:

 * strict
 * warnings
 * HTML::Parser
 * LWP::UserAgent
 * HTTML::Cookies

METHODS

The following method is used to construct a new yesssSMS object:

$sms = yesssSMS->new()

The following method logs into the website with your phone number and the password:

$sms->login(MyPhonenumber,Password)

The following method sends a text message if a login was successful before:

$sms->sendmessage(OtherPhonenumer,Textmessage)

It is possible to send multiple text messages during one login.

The following method logs out of the website of yesss!

$sms->logout()

The following method returns the current login state:

$sms->getLoginstate()

0 means: not logged in

1 means: logged in

The following method returns the result of the last operation:

$sms->getLastResult()

0 means: successful

>0 means: an error occured

The following method returns a textual description of the result of the last operation:

$sms->getLastError()

The following method returns the LWP::UserAgent last return content:

$sms->getContent()

HISTORY

1.00

Original version

2.00

Adopted for the new website being online since August 1st, 2014

AUTHOR

Armin Fuerst

COPYRIGHT AND LICENSE

Copyright (C) 2014 by Armin Fuerst

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.14.2 or, at your option, any later version of Perl 5 you may have available.