Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

idayac's avatar

send some data only for bcc recipient laravel MailMessage

Hi there, can anyone help me on this? i need to send a link only for bcc recipient. im using laravel MailMessage notification

public function toMail($notifiable)
{
    $message = (new MailMessage)
        ->bcc([email protected])
        ->line('hello')
        ->action('View Dashboard', url('/dashboard'))
        ->line('Thank you for using our application!');
    
    if (in_array('[email protected]', $message->bcc)) {
        $message->line('This line is only for Bcc recipients.');
    }
    
    return $message;
}

for normal recipient it will show "hello " and the dashboard button and only for [email protected] will be able to link an additional link

0 likes
3 replies
s4muel's avatar

unfortunately, this is not how it works (not laravel specific, but for bcc recipients). the email content is still the same. if you need different contents, you need to send separate email only to the lead

1 like
Snapey's avatar

bcc stands for Blind Carbon Copy

its the original email copied to someone else, with no evidence in the email that they were copied in

Please or to participate in this conversation.