Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/perl/10.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Perl 无法使用电子邮件::发件人::传输::SMTP从cgi建立连接_Perl_Cgi_Lighttpd - Fatal编程技术网

Perl 无法使用电子邮件::发件人::传输::SMTP从cgi建立连接

Perl 无法使用电子邮件::发件人::传输::SMTP从cgi建立连接,perl,cgi,lighttpd,Perl,Cgi,Lighttpd,我已尝试通过电子邮件::发件人::传输::SMTP发送邮件。当我使用这样的独立脚本时,一切正常: my $transport = Email::Sender::Transport::SMTP->new({ host => ..., ssl =>1, port => 465, localport => 10000, sasl_username => '...', sasl_password => '...', }); my $em

我已尝试通过
电子邮件::发件人::传输::SMTP
发送邮件。当我使用这样的独立脚本时,一切正常:

my $transport = Email::Sender::Transport::SMTP->new({
  host => ...,
  ssl =>1,
  port => 465,
  localport => 10000,
  sasl_username => '...',
  sasl_password => '...',
});

my $email = Email::Simple->create(
  header => [
    To      => '...',
    From    => '...',
    Subject => '...',
  ],
  body => "message",
);

eval {sendmail($email, { transport => $transport })};

但是,当我尝试将其作为cgi(在lighttpd服务器上)执行时,我收到错误
无法建立SMTP连接。。这是lighttpd的麻烦吗?欢迎任何意见!提前谢谢大家

你解决过这个问题吗?