如何解决Laminas \ Mail \ Transport \ Exception \ RuntimeException:
我想从我的网站发送邮件时出现以下错误:
An error occurred
An error occurred during execution; please try again later.
Additional information:
Laminas\Mail\Transport\Exception\RuntimeException
File:
/home/hosting/sander/WWW/vendor/laminas/laminas-mail/src/Transport/Sendmail.php:306
Message:
Unable to send mail: Unknown error
Stack trace:
#0 [internal function]: Laminas\Mail\Transport\Sendmail->mailHandler('Name of recipie...','TestSubject','This is the tex...','Date: Sat,26 S...',' -f'Freeaqingme...')
这是我要执行的代码:
$mail = new Mail\Message();
$mail->setBody('This is the text of the email.');
$mail->setFrom('info@verzeilberg.nl',"Sender's name");
$mail->addTo('sander@verzeilberg.nl','Name of recipient');
$mail->setSubject('TestSubject');
$transport = new Mail\Transport\Sendmail();
$transport->send($mail);
有人遇到此错误吗?就像服务器配置吗?
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。