使用Mail :: IMAPClient的任何代码都有此错误.要验证我是否使用了主题中的以下示例:如何使用Perl对Gmail进行身份验证?
#!/usr/bin/env perl -w
use strict; use warnings;
use Mail::IMAPClient;
# Connect to IMAP server
my $client = Mail::IMAPClient->new(
Server => 'imap.gmail.com',
User => $user,
Password => $pass,
Port => 993,
Ssl => 1,
)
or die "Cannot connect through IMAPClient: $@";
# List folders on remote server (see if all is ok)
if ( $client->IsAuthenticated() ) {
print "Folders:\n";
print "- ", $_, "\n" for @{ $client->folders() };
};
# Say so long
$client->logout();
Run Code Online (Sandbox Code Playgroud)
现在,我已经经历了类似的问题,但从未见过如"网络无法访问"这样的奇怪错误.没有实际的网络问题,ping工作正常.我安装了IO :: …