tej has asked for the wisdom of the Perl Monks concerning the following question:
I am trying to send email by perl script.
use Mail::Sendmail; %mail = ( To => 'email', From => 'email', Message => "This is a minimalistic message" ); if (sendmail %mail) { print "Mail sent OK.\n" } else { print "Error sending mail: $Mail::Sendmail::error \n" }
When I run this code I get error as : "Error sending mail: connect to localhost failed (No connection could be made because the target machine actively refused it.)"
What can be the problem?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Cant send Email
by NetWallah (Canon) on May 27, 2011 at 06:09 UTC | |
|
Re: Cant send Email
by Anonymous Monk on May 27, 2011 at 06:14 UTC | |
|
Re: Cant send Email
by dbs (Sexton) on May 27, 2011 at 13:33 UTC | |
by TomDLux (Vicar) on May 27, 2011 at 15:28 UTC | |
by Mr. Muskrat (Canon) on May 27, 2011 at 15:16 UTC |