內容簡介
外掛主頁 | 外掛作者 | Plus 版本
Simple Email Queue 是一個 WordPress 外掛,用於在特定期間內通過您的主機設置的限制,決定發送多少封電子郵件。
這個基本免費版本只對那些能夠擴展並在他們的代碼中使用它的開發人員有用。如果您想充分使用它,請考慮購買 Plus 版本。
使用方法
首先,您需要設置在特定期間內可發送的電子郵件的最大數量。默認情況下,它會在 6 分鐘內發送 10 封電子郵件。這意味著,如果您在 6 分鐘內發送了 15 封電子郵件,只有 10 封電子郵件會發送,其餘的 5 封電子郵件則放入隊列中,在下一個期間(6 分鐘後)發送。
您可以使用代碼中的過濾器來更改這些限制。過濾器 simple_email_queue_max 用於設置在特定期間內發送的電子郵件的最大數量。它希望傳遞正整數。
要更改期間長度,請使用過濾器 simple_email_queue_interval。它也期望傳遞正整數,但請注意,此數字是以秒為單位而非分鐘(例如,如果您的期間是 30 分鐘,您需要傳遞 1800)。
不同的主機使用不同的限制。請查閱您的主機文檔或支持文檔以找出詳細信息。
如果您要在管理區域使用用戶界面,請使用 Plus 版本。
要使用這些限制,您需要使用 simple_email_queue_add() 函数而非內置的 wp_mail() 函数。這兩個函數接受相同的參數。
使用 wp_mail() 函數發送的電子郵件不會使用隊列發送,因此也不會計入限制。如果您希望所有電子郵件都使用隊列發送,甚至是那些使用 wp_mail() 函數發送的電子郵件,請使用 Plus 版本。
此外,它也在GitHub 上。
外掛標籤
開發者團隊
原文外掛簡介
Plugin homepage | Plugin author | Plus Version
Simple Email Queue is a WordPress plugin that is used to pass restrictions set by your host on number of sent emails in given period.
This basic free version is only useful for developers that can extend it and use it in their code. If you want to use it in full capacity, consider getting plus version.
Usage
First, you need to set what is maximum number of emails that can be sent in a given period. By default, it sends 10 emails in 6 minutes. This means that if you want to send 15 emails in 6 minutes, only 10 emails are sent while rest 5 emails are put in queue and sent in the next period, after 6th minute has passed.
You can change this limits by using filters from you code. Filter simple_email_queue_max is used to set maximum number of emails that are sent in period. It expects positive integer to be passed.
To change period length, you can use filter simple_email_queue_interval. It also expects positive integer to be passed but please take care that this number is of seconds, not minutes (for example, if your period is 30 minutes, you would pass 1800).
Different hosts use different limits. Please consult your host’s documentation or support to find this out.
If you want user interface in your admin area, use plus version.
To use this limits, you need to use function simple_email_queue_add() instead of built-in function wp_mail(). Both accept same parameters.
Emails that are sent using wp_mail() function are not sent using queue and are not counted for limits. If you want that all emails are sent using queue, even those sent using wp_mail() function, use plus version.
And it’s on GitHub.
