NAME

Email::Send::126 - Send email with 126.com's SMTP

VERSION

Version 0.04

SYNOPSIS

use Email::Send::126;
my $smtp = Email::Send::126->new("john","mypasswd");
$smtp->sendmail($subject,$content,'foo@163.com','bar@sina.com');

METHODS

new($username, $password, [$debug])

Create the object.

The username and password are what you registered on 126.com, the largest email provider from China.

my $smtp = Email::Send::126->new("username","password");
# or with debug
my $smtp = Email::Send::126->new("username","password",1);

sendmail($subject, $content, @recepients)

Send the message.

The subject and content can be Chinese (if so they must be UTF-8 string). They will be encoded with UTF-8 for sending.

The message content should be HTML syntax compatible, it will be sent as HTML format.

my $subject = "Hello there";
my $content = "<P>Hi there:</P><P>How are you?</P>";

$smtp->sendmail($subject,$content,'foo@163.com');
# or send to many people
$smtp->sendmail($subject,$content,'foo@163.com','bar@sina.com','zhangsan@gmail.com');

AUTHOR

Ken Peng <yhpeng@cpan.org>

BUGS/LIMITATIONS

If you have found bugs, please send email to <yhpeng@cpan.org>

SUPPORT

You can find documentation for this module with the perldoc command.

perldoc Email::Send::126

COPYRIGHT & LICENSE

Copyright 2012 Ken Peng, all rights reserved.

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