huawei chen
huawei chen

Reputation: 328

How to queue emails and send by PHPMailer?

everyone

Background: I am using phpmailer to send emails. For a group of users to register into our system. So the admin person click register, all the emails(100+) should be sent to their email boxes.

Problem: The admin can not wait a long long time just for the system respond. Also, the system will report timeout after 30 seconds.

Now, only the first 6 or 7 emails are sent successfully. Other emails will be failed to be sent because of timeout.

Question: So, how to fix this problem?

Many thx.

Upvotes: 2

Views: 2699

Answers (1)

Musa
Musa

Reputation: 97672

You can use set_time_limit To increase the time the script is allowed to run, also check out How do i implement this scenario using PHP?

Upvotes: 1

Related Questions