Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

291
Views
Sending email to multiple cc recipients in Laravel 5.4

I have a function that sends an email like this:

Mail::to($email)
->cc($arraywithemails)
->send(new document());

How do I send the email to multiple cc users? I have checked the official documentation but there is no clue there.

over 4 years ago · Santiago Trujillo
2 answers
Answer question

0

The setAdress() function in Mailable allow you to give an array as argument :

Mailable.php

So You should be able to use the function by passing an array as your argument

Mail::to($email)
    ->cc(['name1@domain.com','name2@domain.com'])
    ->send(new document());
over 4 years ago · Santiago Trujillo Report

0

That should work. From the offical Laravel documentation:

Mail::to($request->user())
    ->cc($moreUsers)
    ->bcc($evenMoreUsers)
    ->send(new OrderShipped($order));
over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!