noslenj123 has asked for the wisdom of the Perl Monks concerning the following question:

I have a simple script to send an email posted below. It works fine from laptop#1 but fails on laptop#2 with "Service not available". Both are WinXP, #1 with perl 5.8.8 and #2 with perl 5.10.

It seems like something may be preventing communication on #2 somehow. However, the Mail::Sender docs give no clue to what that error message might mean. #2 was running VPN so I shut that down and no help. Neither are running a firewall.

Does anyone know what that message might really mean? Or what else I might check? Script is:

use Mail::Sender; my $sender = new Mail::Sender; if ( $sender->MailMsg({ smtp => 'my.smtp.net', from => 'myaddr@myhost.net', to => 'myaddr@myhost.net', subject => 'test', msg => 'test', }) < 0 ) { print "Bad: $Mail::Sender::Error\n"; } else { print "Mail sent\n"; }

Replies are listed 'Best First'.
Re: Mail::Sender error -4 service not available
by Anonymous Monk on Jun 12, 2008 at 22:03 UTC
    However, the Mail::Sender docs give no clue to what that error message might mean.

    Service not available means service not available, Mail::Sender doesn't know why, its probably a firewall