因此,我第一次尝试使用Laravelmailer,但是与mail()仅发送邮件的普通php相比,我遇到了一些问题。
我的laravel代码:
if(Mail::send('pages/mail', $data, function($message)
{
$message->from('webmaster@example.com', Input::get('name'));
$message->to('nobody@example.com')->subject('Welcome to My Laravel app!');
}))
{
return "success";
}
else
{
return Mail::failures();
}
Run Code Online (Sandbox Code Playgroud)
我的laravel错误响应:
"["nobody@example.com"]"
Run Code Online (Sandbox Code Playgroud)
(基本上是我输入的邮件地址to()。
如果我使用普通的php,mail()它会毫无错误地发送邮件(它只进入我的垃圾邮件文件夹,但这只是一个测试)。
知道可能是什么问题吗?