我在 cron 中创建了一个函数,通过 wp_mail() 发送大约 250 封电子邮件。但是,我的托管服务提供商不允许每小时发送超过 50 封电子邮件。有没有办法强制 wordpress 缓存所有电子邮件并每小时发送 50 封?
谢谢!
我在 cron 中创建了一个函数,通过 wp_mail() 发送大约 250 封电子邮件。但是,我的托管服务提供商不允许每小时发送超过 50 封电子邮件。有没有办法强制 wordpress 缓存所有电子邮件并每小时发送 50 封?
谢谢!
Here's the Logic you can follow:
I hope that makes sense. Thanks.
You can create a new table named like tasklist
then put all "to send" emails in it and write your cronjob to run 50 of these entries for every hour. Put a flag column to table to mark which one is send and set your script to send the not flagged ones.