Alexander Hartmaier > SMS-Send-AT-TMobile > SMS::Send::AT::TMobile

Download:
SMS-Send-AT-TMobile-0.001.tar.gz

Dependencies

Annotate this POD

View/Report Bugs
Module Version: 0.001   Source  

NAME ^

SMS::Send::AT::TMobile - SMS::Send driver for the T-Mobile Austria SMSC service

VERSION ^

version 0.001

SYNOPSIS ^

    use SMS::Send;
    my $sender = SMS::Send->new('AT::TMobile',
        _login    => 'foo',
        _password => 'bar',
    );
 
    my $sent = $sender->send_sms(
        '_from' => '43676123456789' || 'CUSTOMTEXT',
        'to'    => '43676012345678',
        'text'  => 'This is a test message',
    );

    # Did the send succeed.
    if ( $sent ) {
        print "Message sent ok\n";
    } else {
        print "Failed to send message\n";
    }

METHODS ^

send_sms

Is called by "send_sms" in SMS::Send and takes the additional argument '_from' which defines the sender phone number or text.

Returns true if the message was successfully sent.

Returns false if an error occurred and $@ is set to a hashref of the following info:

    {
        content    => '', # content POSTed to the url above
        is_success => '', # was HTTP POST successful or not (1 or 0)
        as_string  => '', # HTTP POST response as a string
    }

Throws an exception if a fatal error like a http timeout in the underlying connection occurred.

AUTHOR ^

Alexander Hartmaier <abraxxa@cpan.org>

COPYRIGHT AND LICENSE ^

This software is copyright (c) 2013 by Alexander Hartmaier.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

syntax highlighting: