简体   繁体   中英

i have an error in website Eprints, cannot send test email in perl

Connect failed:IO::Socket::.NET: connect: timeout at /usr/share/perl5/Net/SMTP/TLS.pm line 109. here my code at 109

sub new {
    my $pkg = shift;
    my $host= shift;
    my %args= @_;
    $args{Host} = $host;
    $args{Hello}= "localhost" if not $args{Hello};
    # make the non-SSL socket that will later be
    # transformed
    $args{sock} = new IO::Socket::INET(
        PeerAddr    =>  $host,
        PeerPort    =>  $args{Port} || 25,
        Proto       =>  'tcp',
        Timeout     =>  $args{Timeout} || 5)
            or croak "Connect failed :$@\n";



Your outgoing connections to port 25 may be blocked (firewalled) to prevent outgoing spam.

Do you get smtp greeting message when you te.net smtp port on the host from command line?

telnet hostname.domainname 25

Does the smtp server handle MSP (587) port? [port for message submission via smtp protocol]

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM