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
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...
As the founder and passionate educator behind this platform, I’m dedicated to sharing practical knowledge in programming to help you grow. Whether you’re a beginner exploring Machine Learning, PHP, Laravel, Python, Java, or Android Development, you’ll find tutorials here that are simple, accessible, and easy to understand. My mission is to make learning enjoyable and effective for everyone. Dive in, start learning, and don’t forget to follow along for more tips and insights!. Follow him