报错为Address in mailbox given [] does not comply with RFC 2822, 3.6.2.
发送邮件代码如下
Mail::send('mail', ['email' => $email, 'vcode' => $vcode], function ($message) use ($email) {
$message->to($email)->from(env('MAIL_USERNAME'))->subject('安全验证邮件');
});
请问一下这是什么原因啊?
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
查看一下,
$email,env('MAIL_USERNAME')是不是有值,还是为 null