从我处理 DATA 事件的子中:
my $email = Email::Simple->create(
header => [
To => $recipient,
From => $sender,
Subject => $subject,
],
body => $body,
);
sendmail($email);
当我尝试进行测试时,我 telnet 到服务器获取 DATA 并且当我放入 . (触发此事件)我得到了这个:
at /usr/local/share/perl5/Net/Server/Mail.pm line 351, <GEN1> line 6.
Net::Server::Mail::callback('Net::Server::Mail::ESMTP=HASH(0x3a06288)', 'DATA', 'SCALAR(0x3ae0b58)') called at /usr/local/share/perl5/Net/Server/Mail.pm line 233
Net::Server::Mail::make_event('Net::Server::Mail::ESMTP=HASH(0x3a06288)', 'name', 'DATA', 'arguments', 'ARRAY(0x3ae0df8)', 'success_reply', 'ARRAY(0x3ae0f90)') called at /usr/local/share/perl5/Net/Server/Mail/SMTP.pm line 644
Net::Server::Mail::SMTP::data_finished('Net::Server::Mail::ESMTP=HASH(0x3a06288)', '') called at /usr/local/share/perl5/Net/Server/Mail/SMTP.pm line 618
Net::Server::Mail::SMTP::data_part('Net::Server::Mail::ESMTP=HASH(0x3a06288)', '.\x{d}\x{a}') called at /usr/local/share/perl5/Net/Server/Mail.pm line 443
Net::Server::Mail::tell_next_input_method('Net::Server::Mail::ESMTP=HASH(0x3a06288)', '.\x{d}\x{a}') called at /usr/local/share/perl5/Net/Server/Mail.pm line 516
Net::Server::Mail::process('Net::Server::Mail::ESMTP=HASH(0x3a06288)') called at /path/to/mail_server.pl line 47
如果我删除 sendmail 呼叫,它工作正常(除了它不发送电子邮件)。