I am using the default Laravel Mail
class to send emails.
I am trying to add bcc to myself, but when I add a bcc the email is not send at all.
Here
As Ivan Dokov said, you need to pass the email and name to the bcc function. You could also shorten your code by doing this
function($message) use ($toEmail, $toName) {
$message->from('my@email.com', 'My Company')
->to($toEmail, $toName)
->bcc('mybcc@email.com','My bcc Name')
->subject('New order');
}
I have found the problem.
I didn't use the correct parameters for $message->bcc('mybcc@email.com');
I had to write email AND name: $message->bcc('mybcc@email.com', 'My Name');
The same way as I use $message->to($toEmail, $toName);