How do I stop getting '550 relay not permitted' in Perl?

tim85a

New member
I've copied a small program from the internet so I can send emails using Perl, but after changing the email address and smtp I keep getting 'RCPT TO: error (550 relay not permitted)'

What does this mean and how do I stop this error?

This is the code I have

#!/usr/local/bin/perl

use Mail::Sendmail;
unshift @{$Mail::Sendmail::mailcfg{'smtp'}} , 'mail.MyServer.com';

%mail = ( To => '[email protected]',
From => '[email protected]',
Message => "Test"
);

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

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

If it makes a difference, I'm using Windows with Strawberry Perl.

Thanks for your help.
Tim
 
Back
Top