| 开发者 | nanopost |
|---|---|
| 更新时间 | 2026年11月27日 19:08 |
| PHP版本: | 7.4 及以上 |
| WordPress版本: | 7.1 |
| 版权: | GPLv2 or later |
| 版权网址: | 版权信息 |
mail() function, an SMTP password might change, or a plugin update might reset your mail settings. You may only notice when a customer reports a missing order confirmation.
nanoPost Email Check sends a test email on a schedule and logs each result. It shows a notice in wp-admin when a check fails or the scheduled checks stop running.
What to expect
wp-config.php.wp_mail(), so an SMTP plugin that handles wp_mail() sends it through its configured mailer. Email Check does not replace or configure the mailer.
Features
wp email-check changes the settings, runs a check, shows the status and sends a test alert, with exit codes for scripts.wp-config.php. The plugin screen shows them read-only.mail(), or another plugin, and which plugin set it up. When PHP mail() fails because the sendmail program is missing, the error says so.wp_mail(), WordPress's email function. The plugin records whether the call succeeded. If it fails, the log includes any error text reported through wp_mail_failed, such as SMTP Error: Could not authenticate.
A successful check does not confirm delivery. Check the recipient mailbox to make sure the test message arrived.
The plugin screen is at Tools > Email Check.
Free. No paid version.
Full documentation: nanopo.st/email-check-plugin. Source code: GitHub.
Writing about the plugin? The reviewer's guide has the facts, a test-site walkthrough and a press kit.
nanopost-email-check folder to /wp-content/plugins/.No. A pass means WordPress handed the message to its mail system without an error. The message can still bounce or go to spam after that. The test email in your inbox is the proof of delivery. Some plugins also make every check pass: a plugin that disables email on staging sites, or a queue plugin that accepts messages and sends them later.
No. It sends test emails only to the address or addresses you set (at most 3).
Only if you connect the site to nanoPost on the plugin screen. Without a connection, nothing is sent to nanoPost. See "External services" below for what a connected site sends.
A connected site sends each test email to nanoPost instead of the recipient you set. nanoPost shows whether the email arrived, with its SPF, DKIM and DMARC results ("Send test now" shows this proof of arrival on the plugin screen), and alerts you when a test does not arrive. Connecting is optional, and the plugin works in full without it. Disconnect on the plugin screen at any time: test emails then go to your recipient again.
No scheduled check has finished for twice the interval. Usually WP-Cron is not running them: it runs when people visit the site, so on a site with few visitors, or when DISABLE_WP_CRON is set without a server cron job, scheduled events stop. Less often the check starts but crashes, for example with a PHP error in a mail plugin; the PHP error log then shows the cause. The help link in the notice explains how to fix it.
Yes. Enter a webhook URL on the plugin screen. Slack and Google Chat incoming webhooks work directly. For Discord, add /slack to the end of the webhook URL. Automation services can pass the message on to SMS, Microsoft Teams or other tools.
Yes, with WP-CLI. The wp email-check command has these subcommands:
wp email-check settings get and wp email-check settings set <key> <value>: show or change a setting. The keys are recipient, interval (twicedaily, daily or weekly) and webhook_url. A value is checked with the same rules as the plugin screen. An invalid value changes nothing and exits with 1.wp email-check run: send a test email now. The log shows "WP-CLI" as what started it. Exits with 0 when the check passed and 1 when it failed.wp email-check status: show whether the checks run and pass, and whether WP-Cron is disabled or has stopped running events. Add --format=json for scripts. Exits with 0 when all is well, 1 when the last check failed, 2 when scheduled checks have stopped or are not scheduled, and 3 when no check has run yet.wp email-check test-alert: send a test alert to the saved webhook URL. Exits with 0 when the receiver accepted it, and 1 otherwise.run and test-alert have no once-a-minute limit. On multisite, choose the site with --url. For details, run wp help email-check, or read settings in code and WP-CLI.
Yes. Each site runs its own checks, with its own settings, log and notices. Network activation schedules the checks on every site, and on each new site. On a network of more than 10,000 sites, each site is scheduled on its next request instead. On a network where all sites use the same mail setup, activating the plugin on the main site is enough: network activation then sends one test email per site, which repeats the same check.
Yes. Add any of these constants to wp-config.php or a must-use plugin:
define( 'NANOPOST_EMAIL_CHECK_RECIPIENT', 'alerts@example.com' );
define( 'NANOPOST_EMAIL_CHECK_INTERVAL', 'daily' ); // twicedaily, daily or weekly
define( 'NANOPOST_EMAIL_CHECK_WEBHOOK_URL', 'https://hooks.slack.com/services/...' );
A value set in code wins over the plugin screen, and the screen shows it read-only. It must pass the same checks as the screen: an invalid value is ignored, and the plugin screen says so. On multisite, a constant applies to every site. Developers can also use the nanopost_email_check_settings filter, which gets the array of settings (recipient, interval, webhook_url).
Deleting the plugin removes its settings, the log, the webhook state, the dismissed-notice records and the scheduled event. With WP-CLI, use wp plugin uninstall nanopost-email-check --deactivate: wp plugin delete removes only the files and leaves the data in the database.
wp email-check status shows the nanoPost connection; wp email-check run names the test ID and the check page.NANOPOST_EMAIL_CHECK_RECIPIENT constant.wp email-check status says whether WP-Cron is disabled in wp-config.php, and whether an event has been due for more than 10 minutes, which shows that nothing has run WP-Cron since then.wp email-check run says what it sends before it sends. When PHP mail() fails because the sendmail program is missing, it explains the shell's own error line.wp email-check status name the plugin that set up the mailer, for example "Sends through SMTP smtp.example.com:587, set up by WP Mail SMTP". The plugin is named only when all other phpmailer_init callbacks belong to one plugin.mail(), and gets no sendmail hint.wp help email-check status lists the not-checked state and exit code 3.wp email-check status reports not-checked and exits with 3 when no check has run yet, so a script can tell it from a passing check.wp plugin uninstall removes the plugin's data; wp plugin delete removes only the files.wp email-check with settings get and settings set, run, status and test-alert, with exit codes for scripts. A check started this way shows "WP-CLI" in the log.NANOPOST_EMAIL_CHECK_RECIPIENT, NANOPOST_EMAIL_CHECK_INTERVAL and NANOPOST_EMAIL_CHECK_WEBHOOK_URL, and the nanopost_email_check_settings filter. The plugin screen shows these settings read-only.mail(), or another plugin) is shown in Status and in the log.mail() fails because the sendmail program is missing, the error names it."test": true. The webhook status shows when the last message was a test.