in reply to How to send mails from a Windows system

Santh,

I've always used Mail::Mailer from MailTools. Here's some example code:

use Mail::Mailer; my $body = "This is the message body, line 1\n"; $body .= "This is the message body, line 2\n"; my $mailer = Mail::Mailer->new( 'smtp', Server => 'smtp-server.example.com') or die "Unable to create a new mailer object:$!\n"; $mailer->open({ From => "jfluhmann\@example.com", To => "jeremy\@example.com", Subject => "Test E-mail"}) or die "Unable to populate mailer object:$!\n"; print $mailer $body; $mailer->close;

You should also take a look at Mail::Sender (for attaching files or sending in HTML with a plaintext alternative). I hope that helps!

Jeremy