WWW::Fido - Perl extension to send SMS messages to phones served by Fido (http://www.fido.ca)


Fido documentation  | view source Contained in the Fido distribution.

Index


NAME

Top

WWW::Fido - Perl extension to send SMS messages to phones served by Fido (http://www.fido.ca)

SYNOPSIS

Top

  use WWW::Fido;

  $phone = new WWW::Fido ("514-123-4567", "JAPH")
	|| die "Error: Couldn't create phone object: $@\n";

  $phone->send("Hello John")
	|| die "Error: Failed to send message: $@\n";

  $phone->send("Hello Again John")
	|| die "Error: Failed to send message: $@\n";

  $phone->setnumber("514-999-8888")
	|| die "Error: Couldn't set destination phone number: $@\n";

  $phone->setname("John Brown")
	|| die "Error: Couldn't set sender name: $@\n";

  $phone->send("Hello Mary")
	|| die "Error: Failed to send message: $@\n";

DESCRIPTION

Top

This module allows you to send SMS messages to Fido subscribers. It does so by communicating with the web server at http://www.fido.ca and using the Web->SMS gateway available there.

CONSTRUCTOR

Top

new($phone, $sendername)

Constructs and returns a new WWW::Fido object.

An optional scalar as the first argument containing the destination phone number can be supplied. This can be used as a shortcut to save you the call to setnumber().

An optional scalar as the second argument containing the name of the sender can be supplied. This can be used as a shortcut to save you a call to setname().

METHODS

Top

setname($name)

Sets the name of the sender of the message(s). The name will appear in the SMS message at the recipient's end.

setnumber($phone)

Sets the phone number that future send() requests should go to.

send($message)

Sends the supplied message to the phone number previously set on the object.

ERRORS ETC...

Top

The constructor and all methods return something that evaluates to true when successful and false when not successful.

If not successful, the variable $@ will contain an appropriate message clarifying why it failed.

IMPORTANT NOTICE

Top

Please note that depending on the subscriber's phone plan, receiving SMS messages might cost them. ALWAYS check with the recipient you use this module to send messages to beforehand.

AUTHOR

Top

Mina Naguib, mnaguib@cpan.org

COPYRIGHT

Top

SEE ALSO

Top

http://www.fido.ca, HTTP::UserAgent


Fido documentation  | view source Contained in the Fido distribution.