ashok.g has asked for the wisdom of the Perl Monks concerning the following question:
When I run the script for 1st time its gives the following message after taking long time and no email is fired....use Mail::Sender; eval { $sender= new Mail::Sender{smtp=>'localhost'}; $sender->OpenMultipart({ to => 'emailaddress', subject => 'Provisioning Status', multipart => 'mixed', from =>'emailaddress' }); $sender->Part({ctype => 'text/html', disposition => 'NONE', msg => 'Te +st email'}); $sender->EndPart("multipart/alternative"); $sender->Close(); } or print "Error in sending mail: $Mail::Sender::Error\n"; print "Mail sent OK.\n\n";
after running it again I got the below message after long time[ncoadmin@station28 Cox_CMDB]$ perl /tmp/sendmail.pl Mail sent OK.
Any ideas on this?[ncoadmin@station28 Cox_CMDB]$ perl /tmp/sendmail.pl Error in sending mail: Connection not established Mail sent OK.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Problem with Mail::Sender module
by marto (Cardinal) on Nov 18, 2011 at 10:22 UTC | |
by ashok.g (Beadle) on Nov 18, 2011 at 10:44 UTC | |
by marto (Cardinal) on Nov 18, 2011 at 10:49 UTC | |
by ashok.g (Beadle) on Nov 18, 2011 at 10:51 UTC | |
by marto (Cardinal) on Nov 18, 2011 at 10:52 UTC |