Send hundreds of e-mails simultaneously with PHPMailer

I’m building a PHP based CMS with the functionality of sending newsletters. My user will have hundreds of subscribers (probably 200-300 but no way will exceed the maximum of 1000). My mail-sending mechanism works like: loop through all recipients and build a custom mail content for each. This is necessary because each user’s mail will contain a unique “unsubscribe link” that works for only that certain user. In each loop when the mail content is generated (and mail settings are set), I send the mail with PHPMailer. This works fine with small numbers of recipients (like 1-30) but I’m wondering if this mechanism suitable for sending large number of emails, like 200-1000.

So my questions are:

I have never done someting like this before. Do you think it is a viable way to do this?

I guess I have to increase the maximum execution time limit in the php.ini. How many seconds should I set?

Please share your experiences and knowledge about this.

Source: php

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.