Home  >  Article  >  Backend Development  >  laravel5怎么判断邮件发送成功?

laravel5怎么判断邮件发送成功?

WBOY
WBOYOriginal
2016-06-06 20:26:092634browse

这个怎么判断是否发送成功了?

<code>\Mail::raw('Text to e-mail', function($message)
{
    $message->from('from@163.com', '163');
    $message->to('test@qq.com')->subject('Welcome!');
});</code>

回复内容:

这个怎么判断是否发送成功了?

<code>\Mail::raw('Text to e-mail', function($message)
{
    $message->from('from@163.com', '163');
    $message->to('test@qq.com')->subject('Welcome!');
});</code>

默认有返回值的。根据返回值判断发送状态。

建议用第三方邮件服务吧, mailgun, sendcloud 都可以,邮件到达率高 而且发送日志全面。

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn