I have a correct email address. I have echoed it, but when I send it, I get the following error:
Address in mailbox given [] does not comply with RFC 2822, 3.6.2.
Why? I use laravel (swift mailer) to send email:
$email = [email protected]
and then when I send it, the error is thrown.
But if I directly use the string, it sends it.
Here is the block:
Mail::send('emails.activation', $data, function($message){
$message->to($email)->subject($subject);
});
->with('title', "Registered Successfully.");
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…