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?
In reply to Cant send Email by tej
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |