Perl发送邮件模块比较
1.Mail::Sendmail,用这个模块发邮件很简单,可是貌似也只能处理简单的邮件...
use Mail::Sendmail;
use MIME::Lite; $msg = MIME::Lite->new( From => 'me@myhost.com', To => 'me@ahaha.com', #Cc => 'some@other.com, some@more.com', Subject => 'you have got a message', Type => 'multipart/mixed' ); ### Add parts (each "attach" has same arguments as "new"): $msg->attach( Type => 'TEXT', Data => "Here's the GIF file you wanted" ); $msg->attach( Type => 'AUTO', Path => '111.txt', Disposition => 'p_w_upload' ); ### use Net:SMTP to do the sending $msg->send(); |
转载于:https://blog.51cto.com/1656665/770469