in reply to Mime::Lite and SMTP authentication?

Hello,

I have just finished my struggle (successful :))with MIME::Lite and SSL. I was using ActivePerl on Windows. Here are my observations:

1. Make sure that you have the most recent version of perl and all libraries - in most cases new versions of security related libraries are issued in order to fix bugs and compensate detected weaknesses, not to provide new bells and whistles. Therefore, backward compatibility is not the highest priority. Thus, if you have installed perl 3-4 years ago, uninstall it and get the newest version from ActiveState (or whatever distro you use)

2. MIME::Lite as it is right now DOES NOT support SSL. Or at least there is no clear simple way to make it work. With all that said, it IS POSSIBLE to make it work, but you have to modify the library code. But the hack is simple: In the MIME/Lite.pm file find a definition of @_net_smtp_opts table and make sure that it looks like this:

my @_net_smtp_opts = qw( Hello LocalAddr LocalPort Timeout AuthUser AuthPass SSL Port ExactAddresses Debug );

Explanation: MIME::Lite uses Net::SMTP for SMTP protocol. However, for some reason it does not pass all arguments of MIME::Lite->send* method to Net::SMTP->new. It filters them by @_net_smtp_opts table. Only parameters which are in this table are being passed to Net::SMTP constructor. Originally SSL, AuthPass, AuthUser are not there. That's why they never make it to Net::SMTP module.