How To Set Bcc And Cc Mail Address In Laravel Mail?

Share Me
  •  
  •  
  •  
  • 2
  •  
  •  
  •  
  •  
  •  
  •  
  •  
    2
    Shares
How To Set Bcc And Cc Mail Address In Laravel Mail

Hi Dev’s, Today Iin this blog, i will show you how to set bcc and also set cc Mail Address in Laravel Mail. Here i will show you how to set bcc (blind carbon copy) and cc (carbon copy) mail address in laravel mail application. Now we can easy get laravel mail in cc and bcc here the example

Laravel 8 Send Mail using Mailable Class Example

Here we will tell Set Bcc And Cc Mail Address In Laravel Mail before learn how to send Mail here this link

Link: How to Send Mail by using Mailable Class in Laravel 8?

So we are not limited to just specifying the “to” recipients when by sending a message. Also we are free to set “to”, “cc”, and “bcc” recipients all within a single, chained method call:

Solution

Now here this cc() and bcc() method to we can set bcc and cc mail address in laravel mail.

/**
 * Show the application dashboard.
 *
 * @return \Illuminate\Contracts\Support\Renderable
 */
public function myTestMail()
{
    $myUsers = 'nicesnippets@gmail.com';
    $myMoreUsers ='itsolutionstuff@gmail.com';
    $evenMyMoreUsers = 'hdtaboo@gmail.com';
    
    Mail::to($myUsers)
        ->cc($moreMyUsers)
        ->bcc($evenMyMoreUsers)
        ->send(new MyTestMail());
    
       dd("Mail Send Successfully");
}

Read Also : How to Send Email with Attachment in Laravel 8?

Thanks for read. I hope it help you. For more you can follow us on facebook.

About code chef

My name is Shahriar sagor. I'm a developer. I live in Bangladesh and I love to write tutorials and tips that will help to other Developer's. I am a big fan of PHP, Javascript, JQuery, Laravel, Codeigniter, VueJS, AngularJS and Bootstrap from the early stage.

View all posts by code chef →