| 1 | #!/usr/bin/perl | ||
| 2 | |||
| 3 | use strict; | ||
| 4 | require "./yesssSMS.pm"; | ||
| 5 | |||
| 6 | my $sms = yesssSMS->new(); | ||
| 7 | $sms->login('06769510102','x16802'); | ||
| 8 | |||
| 9 | if ($sms->getLastResult!=0) | ||
| 10 | { | ||
| 11 | print STDERR "Error during login: ".$sms->getLastError()."\n"; | ||
| 12 | exit; | ||
| 13 | } | ||
| 14 | |||
| 15 | $sms->sendmessage('00436769510102','Testnachricht'); | ||
| 16 | if ($sms->getLastResult!=0) | ||
| 17 | { | ||
| 18 | print STDERR "Error during sendmessage: ".$sms->getLastError()."\n"; | ||
| 19 | exit; | ||
| 20 | } | ||
| 21 | |||
| 22 | $sms->logout(); | ||
| 23 | if ($sms->getLastResult!=0) | ||
| 24 | { | ||
| 25 | print STDERR "Error during logout: ".$sms->getLastError()."\n"; | ||
| 26 | exit; | ||
| 27 | } |