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
Dec 1, 2023
3
Level 1
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
Please or to participate in this conversation.