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

here's some sample code I got...I get the message: "no connection could be made because the target machine actively refused it" Advice please?
use Mail::Sendmail; %mail = ( To => 'brejen@gmail.net', From => 'brejen@comcast.net', Message => "This is a very short message" ); $mail{Smtp} = 'smtp.mail.yahoo.com'; sendmail(%mail) or die $Mail::Sendmail::error; print "OK. Log says:\n", $Mail::Sendmail::log;

Replies are listed 'Best First'.
Re: Mail::Sendmail on windows with ActiveState Perl
by Old_Gray_Bear (Bishop) on Jun 14, 2013 at 20:05 UTC
    Yahoo! does not run open Mail Relays. You might try an SMTP server in the comcast.com domain and see if you have better luck.

    ----
    I Go Back to Sleep, Now.

    OGB

Re: Mail::Sendmail on windows with ActiveState Perl
by rpnoble419 (Pilgrim) on Jun 16, 2013 at 05:52 UTC

    You may also try using a valid user id and password to send your emails. Many systems will allow a relay only with authorized users.