What is the best way to send out thousands of emails from a WordPress site? [closed]

  1. Sending hundreds of emails from a web server will usually get that server added to spam lists, it’s a great way for all your emails to get flagged as junk. It’s also incredibly rude to other people on the same server, as all their emails get flagged as spam too, and violates many hosting providers terms of service.
  2. Use a service. You had the right idea using SendGrid instead of rolling your own solution.
  3. Sending 5000 emails is going to take time, it is not a quick and easy thing. Don’t try to do all 5000 at once in bulk. Instead, do it in small frequent batches. Why 1 batch of 5000 when you can have 50 batches of 100 spread out across an hour? Form a queue!
  4. Sending email really isn’t that simple, in order for your server to be trusted to send an email by others you have to do all sorts of additional steps with DNS and signing etc
  5. GMail etc have daily limits on how many emails you can send, e.g. Google sets 500 last I checked. Even then it wouldn’t really improve the speed
  6. SendGrid probably has a faster way to send things by talking directly to their API and sending things in batches rather than one at a time
  7. Creating 5k things is going to take time, even if we don’t send them, generating those emails isn’t free, even if wp_mail/sending was instantaneous, it’d still take time

So what you should do:

  • Consider other transactional email providers
  • Talk directly to them instead of overriding wp_mail
  • Do smaller more frequent batches instead of one big one
  • Ask SendGrid for advice
  • Check it’s the sending of the emails that’s actually the problem, 5k is still a lot of emails to generate, nevermind sending them