最近试着利用模组Email::Send::SMTP::Gmail寄信 但是当我将smtp server设定成smtp.gmail.com会无法将信件寄出 会出现错误讯息: Connecting to smtp.gmail.com using tls with LOGIN on port 587 and timeout of 60 Could not connect to SMTP server Can't locate object method "send" via package "Net::SMTPS: connect: Network is unreachable" (perhaps you forgot to load "Net::SMTPS: connect: Network is unreachable"?) at gmail.pl line 22. 但是当我将smtp server改成ip时就可运作 我确认我主机有设定dns,可用nslookup指令正解域名 我的主机OS是CentOS 6.7 程式码如下: #!/usr/bin/perl -w # use warnings; use Email::Send::SMTP::Gmail; @test=("aaaaaa","bbbbbbbbbbbbb","ccccccc"); my $mail=Email::Send::SMTP::Gmail->new( -smtp=>'smtp.gmail.com', # -smtp=>'64.233.189.109', -login=>'[email protected]/*