I don't really know what MTAs are for. I don't think I used one.

I'm sure you have used a Mail Transport Agent before, even multiple times. In fact, you use it every time you send an e-mail. It is what is commonly known as "mail server". The other thing commonly found in the E-Mail RFCs is a Mail User Agent, commonly known as "mail client". MIME::Lite is one of those clients when it uses SMTP to connect to a mail server. The system's sendmail program can also work as MUA / mail client, this happens when MIME::Lite calls sendmail.

The examples shown in the MIME::Lite documentation are pretty good, they should get the OP started within a few minutes. The only problem of MIME::Lite is the sendmail mode, there is really no need to use sendmail at all, even on a Unix system. Unfortunately, some old versions of MIME::Lite insist on having a sendmail binary somewhere except on Windows, and they default to using sendmail instead of sending via SMTP.

Whenever I use MIME::Lite, my code starts with something like MIME::Lite->send('smtp', $mailserver, Timeout=>60, AuthUser=>$user, AuthPass=>$pass); to switch to authenticated SMTP mode. Most times, I use a tiny wrapper around MIME::Lite that reads the application's configuration file for mail server, login and password, switches to SMTP, and sometimes adds some extra features to MIME::Lite. Last time I looked, MIME::Lite had some internal helper functions (not methods), so clean inheritance did not work too well, runtime patching was required for some extra features.

Alexander

--
Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)

In reply to Re^3: How to send mail (with attachments) from a Winx64 box by afoken
in thread How to send mail (with attachments) from a Winx64 box by cenobite1066

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.