No such thing as a small change | |
PerlMonks |
Net::SMTP shortcomings if used as a general mail sending moduleby kappa (Chaplain) |
on May 31, 2002 at 16:36 UTC ( [id://170761]=perlmeditation: print w/replies, xml ) | Need Help?? |
I think Net::SMTP is used as a general mail sender much more often than it should. People are usually using it on Windows because there's no /usr/sbin/sendmail or to gain Windows compatibility for their code even if sendmail(1) is available.
By using Net::SMTP instead of MIME::Lite, Mail::Sendmail or Mail::Sender we usually lose:
flexibility when specifying email addresses
ability to send complex emails (MIME)
ability to send mail in SMTP-challenged environments My hosting provider runs cgi-scripts inside a sandboxed environment without ip-connectivity to Internet. (And that's a good security practice for all free hostings out there). And the provider allows sending mails only via sendmail(1) just to be able to impose restrictions on sending mail. Even if these facts may seem of little importance to the majority of Perl programmers out there, Net::SMTP gives practically no advantages over other mail-sending modules, which are usually capable of using either SMTP connection or sendmail(1). The only advantage I see is sending several mails via a single connection for speed. In this case your (very specialized) program is more of an SMTP client than a mail-sending entity. And that's the very case Net::SMTP is perfect to serve, but such cases are very rare (are you a bulk sender?). And it's sad for me to see such posts as Net::SMTP v local MTA or SMTP Modules that are both Win32 and Unix compliant when people intentionally choose Net::SMTP over other alternatives due to Windows lacking sendmail(1). Update: I just found the relevant item in perlfaq9. It confirms my strong negative feelings about too wide-spread use of Net::SMTP.
Back to
Meditations
|
|