Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

Sending Emails With Authentication

by jking_98 (Initiate)
on Aug 19, 2003 at 18:41 UTC ( [id://284978] : perlquestion . print w/replies, xml ) Need Help??

jking_98 has asked for the wisdom of the Perl Monks concerning the following question:

I have been using MIME::Lite to send emails with attachments, but now I am having a problem. We just changed SMTP mail providers and our new provider requires authentication. Is there anyway to send the user name and password when calling the MIME::LITE "send" method or is there another mail module that allows you to send messages with attachments using authentication? Thanks in advance.

Replies are listed 'Best First'.
Re: Sending Emails With Authentication
by tcf22 (Priest) on Aug 19, 2003 at 19:02 UTC
    I prefer Mail::Sender, written by our own jenda.

    Example Straight from CPAN:
    if ($sender->MailMsg({ smtp => 'mail.yourISP.com', from => 'somebody@somewhere.com', to =>'Jenda@Krynicky.czX', subject => 'this is a test', msg => "Hi Johnie.\nHow are you?" auth => 'NTLM', authid => 'jenda', authpwd => 'benda', }) < 0) { die "$Mail::Sender::Error\n"; } print "Mail sent OK."
Re: Sending Emails With Authentication
by phydeauxarff (Priest) on Aug 19, 2003 at 18:58 UTC
Re: Sending Emails With Authentication
by batkins (Chaplain) on Aug 19, 2003 at 21:58 UTC
Re: Sending Emails With Authentication
by jking_98 (Initiate) on Aug 20, 2003 at 21:19 UTC
    Thank you for all of your recommendations.