mercredi 30 novembre 2016

Laravel Mail: how to send batch emails per specific domain

I am building a newsletter management system using Laravel 5.2.45 which allows the ability for users to send mass emails to mailing lists. As of the moment my example mailing list contains thousands of different email addresses with different email providers such as '@gmail.com', '@hotmail.co.uk'... etc.

When the system is in use, newsletters could potentially be sent to 1000's upon 1000's of different emails, which brings me to ask these few questions.

1) Based on research I believe that it is ideal to minimize the number of connections Laravel opens and closes when sending emails. Meaning, to order the provider domains and send them in batches, so sending all '@gmail.com' in one go so only one connection is open and closed to the gmail server. Is this accurate?

2) If question one is accurate, what would be the best route of doing this using Laravel mail (if the native Laravel mail has the capability of doing so)? I am aware of the ability to use Laravel mail's queue functionality but I am unsure if this would make sure only one connection was open and closed per domain type.

3) Additionally, is the any negative impact of using the Laravel mail class to send newsletters that could potentially go to 20,000 customer emails several times a day?

Thank You,

Kieren.



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire