dra87370 2019-06-14 10:38 采纳率: 100%
浏览 76
已采纳

同时发送多封邮件时页面有效多长时间?

I have a CSV file which contains for example 50 different mails in 50 rows. When I import the file, I need to read that mails one by one and store mails in the database and then send some contents to every each of them. I'll implement that functionality with php mail function.

The problem is for sending that multiple mails, would it exceed the maximum loading time? Would it crash the page? If so, are there any other ways to achieve my requirements?

Thanks.

  • 写回答

1条回答 默认 最新

  • duanfei7508 2019-06-14 10:43
    关注

    You need to increase the PHP setting max_execution_time. Depending on the configuration, you can set it via an INI file or via ini_set().

    However, I think that the mail() function does not require a lot of time. Afaik, the mail is just given to the MTA (and added to a queue), and the MTA does the rest for you. So you should be fine and your PHP script should not cancel due to the max execution time.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?