Hey everyone,
I'm thinking about how to handle sending large amounts of email from my web applications, and whether there are any best practices for doing so. StackOverflow is already labeling this as 'subjective', which it may be to an extent, but I need to know the most successful way to implement this system, or whether any standardized approach exists.
In my webapp, there are users who are heads of groups of 1 to 10,000 users. This user must be able to email send a message to all of these users through my system. Therefore, my system is responsible for sending up to 10,000 emails to individual users for each group head.
As far as I can tell, there is no rate limit in GMail for sending messages to individuals (although there is a 500 recipient max).
Right now, my current setup is:
- When a message is sent through the system, it enters an email queue.
- A cron script grabs messages from the queue every few minutes, and sends out those emails.
- All email is taking place through GMail's SMTP server.
- The actual application doing the mailing is PHPMailer.
This setup, as the user base grows, will probably not suffice. The questions I have are:
- Should I be using a local SMTP server instead?
- Should I use a mail binary on the local machine instead? I this case, I could probably skip the queue altogether?
- Is there an accepted way to do this?
Thanks!