SwiftMailer Batch email times my Server out

喜欢而已 提交于 2019-12-04 09:22:10

Sending emails is the most complicated thing to do online.

It is the second most used service and the most abused.

I built my own custom email platform for sending bulk emails.

The timeout you experience is because of the Apache and PHP execution limits.

You need to run it as a CLI application with set_time_limit (0);

php /path/to/app/script.php something like this straight in the console.

If you do not have SSH access then run it with shell_exec like this:

shell_exec("php /path/to/app/script.php > /dev/null 2>/dev/null &");

This will ensure that the script that calls it does not hang around till it finishes.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!