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 is my code:
Mail::send(
'emails.order.order',
array(
'dateTime' => $dateTime,
'items' => $items
),
function($message) use ($toEmail, $toName) {
$message->from('my@email.com', 'My Company');
$message->to($toEmail, $toName);
$message->bcc('mybcc@email.com');
$message->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);