Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?

Mail::Sendmail Cannot Send out email

by Gary Yang (Acolyte)
on May 02, 2012 at 19:52 UTC ( #968523=perlquestion: print w/ replies, xml ) Need Help??
Gary Yang has asked for the wisdom of the Perl Monks concerning the following question:

I got the errors when I tried to send out email.

CPT TO: error (553 sorry, that domain isn't in my list of allowed rcpthosts (#5.7.1))

Below is the code. Please help.

#!/opt/ActivePerl-5.14/bin/perl -w use Mail::Sendmail qw(sendmail %mailcfg); my (%mail, $MailTo, $subject, $message, $from); $mailcfg{smtp} = [qw(]; $mailcfg{port} = 25; # default $MailTo = ''; $from = ''; $subject = "Test"; $message = "Message Test"; %mail = ( To => $MailTo, From => $from, Subject => $subject, Message = +> $message); sendmail(%mail);

Comment on Mail::Sendmail Cannot Send out email
Download Code
Replies are listed 'Best First'.
Re: Mail::Sendmail Cannot Send out email
by stevieb (Vicar) on May 02, 2012 at 20:08 UTC

    This is a QMail server error. The server is informing you that a) the email address is not local and b) it won't relay it for you. You'll have to contact the server administrator and talk to them about what you're trying to do.

Re: Mail::Sendmail Cannot Send out email
by trwww (Priest) on May 03, 2012 at 04:34 UTC

    To extend on stevieb's reply, you probably need to provide credentials (perhaps a username and password) in order to relay from this server. Mail::Sendmail doesn't support this. So if this is indeed the part you're missing, you'll have to pick another email module or write your own that does support SMTP authorization.

      ... or install a local mail server (e.g. postfix), configure that correctly, and tell Mail::Sendmail to use localhost.

      perl -E'sub Monkey::do{say$_,for@_,do{($monkey=[caller(0)]->[3])=~s{::}{ }and$monkey}}"Monkey say"->Monkey::do'
Re: Mail::Sendmail Cannot Send out email
by mendeepak (Scribe) on May 04, 2012 at 06:40 UTC

    Hi This error message indicates that the remote server has rejected your message due to your host not being on a list of servers able to send the destination server mail. This error can also indicate that your e-mail address or server is listed on a DNS blacklist. You will need to contact the remote server administrator for assistance with this issue. This error has nothing to do with module, it is a problem with the remote host

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://968523]
Front-paged by Corion
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (2)
As of 2015-11-29 01:11 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (746 votes), past polls