Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

ihprince's avatar

Best way to send bulk email in Laravel?

Hello I'm currently working on a Laravel project where I need to send emails to a substantial number of recipients, approximately 10,000 at a time. I want to ensure that I'm following the best practices to optimize performance and prevent any potential issues. I want to get notify all user by email at the same time, all user must receive email at the same time without any delay

I try this

$users = DB::table('users')->pluck('email');
foreach ($usersas $user) {
   Mail::to($user)->send(new SendEmail());
 }

It takes too much time also dropped loading performance? what is the best way to send email all user at the same time? And also If some emails failed, how to fix them?

0 likes
9 replies
gych's avatar

Like @arifthefinix said you should use a Job for this. These jobs run in queue in the background and will help you improve the performance for sending all these emails. You can implement the failed method in your job class to log or handle the failed jobs when emails failed to send.

I advise you to check this Laracasts serie, first lessons are free: https://laracasts.com/series/laravel-queue-mastery

This is the documentation from the Laravel docs: https://laravel.com/docs/10.x/queues

ihprince's avatar

@gych If I use queue job, then all 10k user will get email at the same time?

gych's avatar

@ihprince That depends on a lot of factors. 10k emails will never be received at exactly the same time but very close to each other if your setup is good. Also make sure that your smtp / mail server is set up correctly to handle these amount of mails going out and that the delivery for example to outlook goes well.

EDIT: Like others have already metioned in this post, handling your own mail server can be challenging because of several reasons like for example email deliverability. So looking into using an external mail service might be an easier solution than doing it via your own server.

1 like
tykus's avatar

@ihprince on that scale, I would be using a service such as Mailchimp, Sendgrid, Mailgun etc. They already have the APIs and the tools to handle mailing large numbers of recipients; your integration with one of these services is relatively easy by comparison.

kokoshneta's avatar

@tykus Not to mention that, if you don’t know exactly what you’re doing with your e-mail server and put a lot of work into maintaining things, sending this amount of e-mails from your own mail server is likely to result in a severe hit to its IP reputation, which will in turn mean that your recipients are less likely to receive your e-mails.

martinbean's avatar

@ihprince You’re better off using a service that actually deals with sending bulk emails, such as Mailchimp or Campaign Monitor. Because if you try and send that many emails from a plain server, then you run the risk of getting your server’s IP address black-listed, and then any email you send will be marked as spam.

1 like
ronit212's avatar

Here’s an easier approach:

  1. Use Queues: Send emails in the background to avoid delays.
  2. Batch Emails: Send emails in smaller groups for faster processing.
  3. Use a Good SMTP Service: Use services like SMTPmart, Mailgun or SMTPget for handling many emails efficiently.
snowjohn's avatar

In Laravel, I use Queues + Mailables with SMTPwire for smooth bulk sending. I warm up domains using WarmupSMTP and track delivery via Mailtrap. Fast, reliable, and inbox-friendly.

Please or to participate in this conversation.