in reply to Re^2: How to send mail (with attachments) from a Winx64 box
in thread How to send mail (with attachments) from a Winx64 box
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
|
|---|