How to Send CC and BCC Email Address in Laravel Mail?

Sovary October 23, 2022 624
1 minute read

In this tutorial we will show to send BCC and CC in Laravel mail address. You can send email with bcc (blind carbon copy) and cc (carbon copy) with Laravel email address. You can easily send email with bcc and cc with some functions in Laravel mail, so today you will learn Laravel mail with many CC and multiple Bcc with basic example, you can use these tips with laravel 6, laravel 7, laravel 8 and laravel 9 versions.

So let's see the below example how we use function cc() and bcc() to send multple recipient email. Follow Mail Sending Tutorial: Laravel Send Email Tutorial

Send CC and BCC Email Address in Laravel Mail

We are going to show the important point where to set Bcc and CC in Laravel mail, so in controller file we will implement in controller file as below:

Open file app -> Http -> Controllers -> MailController.php

namespace App\Http\Controllers;
  
use Illuminate\Http\Request;
use Mail;
use App\Mail\Mymail;
  
class MailController extends Controller
{

    public function index()
    {
        $data = [
            'title' => 'Deliver for cambotutorial.com',
            'body' => 'CC and Bcc email using SMTP.'
        ];
  
        $cc = ["example_1@gmail.com", "example_2@gmail.com", "example_3@gmail.com"];
        $bcc = ["bcc1@gmail.com", "bcc2@gmail.com"];
         
        Mail::to('reciever@gmail.com')
                ->cc($cc)
                ->bcc($bcc)
                ->send(new Mymail($data));
           
        dd("Email has sent successfully.");
    }
}

We go straigth to point in controller, so hope this short article help you to implement mailable class with BCC and CC reciever. Thank for your reading time.

You may also like...

Laravel  PHP  Laravel 9  Laravel Mail 
Author

Founder of CamboTutorial.com, I am happy to share my knowledge related to programming that can help other people. I love write tutorial related to PHP, Laravel, Python, Java, Android Developement, all published post are make simple and easy to understand for beginner. Follow him