SMS::Send::CMTelecom - SMS::Send driver for the CMTelecom SMS gateway
use SMS::Send; my $sender = SMS::Send->new('CMTelecom', _producttoken => '00000000-0000-0000-0000-000000000000', ); my $sent = $sender->send_sms( 'text' => 'This is a test message', 'to' => '+55 (19) 1234 5678', '_from' => '+55 (18) 1234 5678', ); # Did the send succeed. if ( $sent ) { print "Message sent ok\n"; } else { print 'Failed to send message\n"; }
This module currently uses the HTTPS JSON API.
# Create new sender using this driver. my $sender = SMS::Send::->new('CMTelecom', _producttoken => '00000000-0000-0000-0000-000000000000', );
The _producttoken param is a mandatory parameter which is needed to authenticate against the CMTelecom messaging gateway.
_producttoken
It is called by "send_sms" in SMS::Send and passes all arguments starting with an underscore to the request having the first underscore removed as shown in the SYNOPSIS above.
It returns a boolean value telling if the message was successfully sent or not.
It throws an exception if a fatal error like a http timeout in the underlying connection occurred.
Please report any bugs or feature requests on Github: https://github.com/sonntagd/SMS-API-CMTelecom/issues
Copyright 2017 Dominic Sonntag.
This program is free software; you can redistribute it and/or modify it under the terms of the the Artistic License (2.0). You may obtain a copy of the full license at:
http://www.perlfoundation.org/artistic_license_2_0
To install SMS::API::CMTelecom, copy and paste the appropriate command in to your terminal.
cpanm
cpanm SMS::API::CMTelecom
CPAN shell
perl -MCPAN -e shell install SMS::API::CMTelecom
For more information on module installation, please visit the detailed CPAN module installation guide.