NAME
SMS::Send::KR::CoolSMS - An SMS::Send driver for the coolsms.co.kr service
VERSION
version 0.008
SYNOPSIS
use SMS::Send;
# create the sender object
my $sender = SMS::Send->new('KR::CoolSMS',
_ssl => 1,
_user => 'keedi',
_password => 'mypass',
_type => 'sms',
_from => '01025116893',
);
# send a message
my $sent = $sender->send_sms(
text => 'You message may use up to 80 chars and must be utf8',
to => '01025116893',
_from => '02114', # you can override $self->_from
);
unless ( $sent->{success} ) {
warn "failed to send sms: $sent->{reason}\n";
# if you want to know detail more, check $sent->{detail}
use Data::Dumper;
warn Dumper $sent->{detail};
}
DESCRIPTION
SMS::Send driver for sending SMS messages with the coolsms SMS service. You'll need IO::Socket::SSL at least 1.84 version to use SSL support for HTTPS.
ATTRIBUTES
_url
Do not change this value except for testing purpose. Default is "api.coolsms.co.kr/sendmsg"
.
_agent
The agent value is sent as the "User-Agent" header in the HTTP requests. Default is "SMS-Send-KR-CoolSMS/#.###"
.
_ssl
If this is set, then use HTTPS rather than HTTP. Default is 0
.
_timeout
HTTP request timeout seconds. Default is 3
.
_user
Required. Username to login for coolsms.
_password
Required. Password to login for coolsms.
_enc
Password encryption method to transfer password over HTTP/HTTPS. Currently only "md5"
is supported.
_from
Required. Source number to send sms.
_type
Type of sms. Currently only sms
is supported. Default is "sms"
.
_country
Country code to route the sms. This is for destination number. Default is "KR"
.
METHODS
new
This constructor should not be called directly. See SMS::Send for details.
send_sms
This constructor should not be called directly. See SMS::Send for details.
Available parameters are:
text
to
_epoch
_mid
_gid
SEE ALSO
AUTHOR
Keedi Kim - 김도형 <keedi@cpan.org>
COPYRIGHT AND LICENSE
This software is copyright (c) 2013 by Keedi Kim.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.