Email::Send::Netease - Send email with Netease's SMTP servers
Version 0.02
use Email::Send::Netease; my $smtp = Email::Send::Netease->new('john@126.com','mypasswd'); $smtp->sendmail($subject,$html_body,'foo@163.com','bar@sina.com');
Create the object.
The email and password are what you registered on Netease, whose domains include 126.com, 163.com, 188.com, yeah.net
my $smtp = Email::Send::Netease->new('foo@126.com','password'); # or with debug my $smtp = Email::Send::Netease->new('foo@126.com','password',1);
Send the message.
The subject and body can be Chinese (if so they must be UTF-8 string). They will be encoded with UTF-8 for sending.
The message body should be HTML syntax compatible, it will be sent with text/html format.
my $subject = "Hello"; my $html_body =<<EOF; <html> <body> <h1>Hello there</h1> <p>It's nice to see you.</p> </body> </html> EOF $smtp->sendmail($subject,$html_body,'foo@163.com'); # send to more than one people $smtp->sendmail($subject,$html_body,'foo@163.com','bar@sina.com', ...);
Ken Peng <yhpeng@cpan.org>
If you have found bugs, please send email to <yhpeng@cpan.org>
You can find documentation for this module with the perldoc command.
perldoc Email::Send::Netease
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.
To install Email::Send::Netease, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Email::Send::Netease
CPAN shell
perl -MCPAN -e shell install Email::Send::Netease
For more information on module installation, please visit the detailed CPAN module installation guide.