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.


In reply to Re: Mime::Lite and SMTP authentication? by pkaluski
in thread Mime::Lite and SMTP authentication? by ikaruga

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.