开发者

I need to send an email from a perl CGI script without using sendmail

I need to send an emai开发者_运维知识库l that contains html in a perl CGI script without using sendmail. Is there a easy way to do this?


The synopsis of Email::Sender shows how to send mail directly via SMTP.


You must send HTML code? The standard Perl distribution comes with Net::SMTP which implements the SMTP protocol directly in Perl. This means you can send mail on systems that don't have the sendmail or mail commands implemented, or sendmail installed. I've used it for years without too many issues.

If you can download Perl modules, you should look at Email::MIME. That allows you to send out MIME multipart email, and doesn't depend upon Sendmail. I haven't used this one all that much, but it isn't that difficult to use.


There are many many modules on the CPAN that will do mail sending for you. http://search.cpan.org/

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜