如何在PHP邮件程序中发送延迟以发送大量电子邮件

时间:2022-10-23 17:21:59

I have the limit that i cant send more than 5 emails per second.

我有限制,我不能每秒发送超过5封电子邮件。

I am using PHPMailer 5.2.6

我正在使用PHPMailer 5.2.6

https://github.com/PHPMailer/PHPMailer/

https://github.com/PHPMailer/PHPMailer/

Is there any way i can put 1 sec delay after 5 emails

有什么办法可以在5封电子邮件后放1秒延迟

I am using sendmail in PHP script and use cron job to send emails

我在PHP脚本中使用sendmail并使用cron job发送电子邮件

1 个解决方案

#1


1  

Use sleep(1) in your loop to put 1 sec delay

在循环中使用sleep(1)可以延迟1秒

#1


1  

Use sleep(1) in your loop to put 1 sec delay

在循环中使用sleep(1)可以延迟1秒