Laravel mail bcc

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-04 02:10:32

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);

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');
    }
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!