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

I want to write a PERL script that will email the content of some HTML and Text files as a body message to certain set of users.

Some of the users have their accounts on Yahoo, Gmail, MSN etc

Also some of the users are present on my Exchange Server which is situated locally.

Let me know the best PERL Email modules that will make my job easy to accomplish.

Replies are listed 'Best First'.
Re: Perl modules related to Emailing
by Corion (Patriarch) on Apr 23, 2009 at 16:34 UTC
Re: Perl modules related to Emailing
by mikeraz (Friar) on Apr 23, 2009 at 17:20 UTC

    Mail::Sender does a wonderful job of this. Has a 5 star rating too.

    Be Appropriate && Follow Your Curiosity
Re: Perl modules related to Emailing
by paragkalra (Scribe) on Apr 24, 2009 at 19:23 UTC
    Here is my code:
    use MIME::Lite; $msg = MIME::Lite->new( From =>'myname@gmail.com', To =>'myname@gmail.com', Subject =>'Helloooooo, nurse!', Data =>"How's it goin', eh?" ); $msg->send('smtp', 'smtp.gmail.com', AuthUser=>'myname@gmail.com' +, AuthPass=>'mypassword', Debug=>1);
    This is what I am getting:
    C:\tmp>perl smtp.pl MIME::Lite::SMTP>>> MIME::Lite::SMTP MIME::Lite::SMTP>>> Net::SMTP(2.31) MIME::Lite::SMTP>>> Net::Cmd(2.29) MIME::Lite::SMTP>>> Exporter(5.63) MIME::Lite::SMTP>>> IO::Socket::INET(1.31) MIME::Lite::SMTP>>> IO::Socket(1.30) MIME::Lite::SMTP>>> IO::Handle(1.27) MIME::Lite::SMTP=GLOB(0x1be605c)<<< 220 mx.google.com ESMTP t1sm546166 +8poh.9 MIME::Lite::SMTP=GLOB(0x1be605c)>>> EHLO localhost.localdomain MIME::Lite::SMTP=GLOB(0x1be605c)<<< 250-mx.google.com at your service, + [59.95.64.55] MIME::Lite::SMTP=GLOB(0x1be605c)<<< 250-SIZE 35651584 MIME::Lite::SMTP=GLOB(0x1be605c)<<< 250-8BITMIME MIME::Lite::SMTP=GLOB(0x1be605c)<<< 250-ENHANCEDSTATUSCODES MIME::Lite::SMTP=GLOB(0x1be605c)<<< 250 PIPELINING SMTP auth() command not supported on smtp.gmail.com

    It is failing because of following:

    SMTP auth() command not supported on smtp.gmail.com
    Any Pointers?