simple sendmail problem

44 views
Skip to first unread message

deepak

unread,
Jan 20, 2008, 10:39:47 AM1/20/08
to Perl Mail::Sendmail
hi ,

I had this program ,

#!/usr/bin/perl
use Mail::Sendmail;

%mail = ( To => 'deepak...@yahoo.co.in',
From => 'm...@here.com',
Message => "This is a very short message"
);

sendmail(%mail) or die $Mail::Sendmail::error;

print "OK. Log says:\n", $Mail::Sendmail::log;


And when i executed it it shows the following error message :
localhost not found
connect to localhost failed () no (more) retries!

please help me with this problem.

sopan....@gmail.com

unread,
Jan 30, 2008, 10:07:43 PM1/30/08
to Perl Mail::Sendmail
try setting $mail{'smtp'} = your_mail_relay_server

About not finding localhost connection error - You are not running any
mail service localhost. Try "telnet localhost 25" - it should
prompt ....^] kind of chars...

I suggest you to get the mail relay server from your IT/ISP - then
write the script.

Regards,

--sopan shewale




On Jan 20, 7:39 am, deepak <xplorer4new...@gmail.com> wrote:
> hi ,
>
> I had this program ,
>
> #!/usr/bin/perl
> use Mail::Sendmail;
>
> %mail = ( To => 'deepak.ba...@yahoo.co.in',
> From => '...@here.com',
Reply all
Reply to author
Forward
0 new messages