=== Email Spam Tester ===
Contributors: tanichev
Tags: email deliverability, spam test, spf, dkim, dmarc
Requires at least: 6.4
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 0.1.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Test the email your site sends, the way it really sends it: 42 checks, the folder at email providers, DNS records to fix, and a watch on every email.

== Description ==

Every email a WordPress site sends goes through `wp_mail()`: password resets, contact forms, WooCommerce orders. When one lands in spam or is refused, the site gets no notice of it.

Email Spam Tester sends a test from your site through that same `wp_mail()` path, with your SMTP plugin if you use one, and shows what the receiving side sees.

It is not an SMTP plugin and does not replace how your site sends. Keep whatever sends your mail now; this plugin checks the result, the way a receiving mail server and a spam filter see it.

= What a test checks =

* SPF, DKIM, DMARC and their alignment, ARC, the sending server's reverse DNS, HELO and TLS, the major blocklists.
* SpamAssassin and other spam filters, content, links, images, the Gmail and Yahoo sender rules.
* A score out of 100 and the classic 0 to 10.
* An AI plan that says what to change, with the exact DNS records.
* With the folder check: where the email lands at Gmail, Outlook, Yahoo, Proton, AOL and other providers (Inbox, Spam, Promotions), and what a provider answered when it refused it.

= What you can send =

* Your site's own emails, with sample data instead of a real customer: password reset, new user and comment moderation in WordPress's wording, and with WooCommerce the processing, completed, invoice and new order emails, rendered by WooCommerce itself.
* A standard short test email.
* Your own email: paste the subject and HTML.

= Built for WordPress =

* **How your site sends:** the plugin reads whether WordPress uses PHP `mail()` or SMTP, which SMTP plugin (WP Mail SMTP, FluentSMTP, Post SMTP, Easy WP SMTP and others) and which host, and the plan advises on that, not only on DNS.
* **Records to copy:** SPF with your SMTP provider's include, DMARC, checked against public DNS before you send anything.
* **History:** every test with both scores, the folder counts, a chart, and the checks that changed since the previous test.
* **Monitoring (optional):** each new kind of email the site sends gets a technical report, grouped by the plugin that sent it, with alerts such as "WooCommerce: DMARC fails" or "Contact Form 7: emails failed to send". Repeats of a kind within an hour are not copied.
* **Site Health** tests, a **dashboard widget**, and **WP-CLI**: `wp email-spam-tester test --email=password_reset`.

The service is free to use right now.

== External services ==

This plugin works with Email Spam Tester (https://email-spam-tester.com), an external email testing service. The plugin's author runs it. Nothing is sent until an administrator presses "Connect this site".

* When connecting: the WordPress and plugin versions, the number of sites, and an optional contact email. The site is registered under an id made from its address and a secret kept on the site, which tells the service nothing; the site's URL reaches the service only inside test emails.
* For each test, the emails: the test email goes to the service's test address. With the folder check, about 30 copies go to the service's test mailboxes at email providers and, for Gmail, to public test mailboxes run by a third party, where anyone can see the subject, the sender name and the folder.
* For each test, the facts that come with it: the sending domain, the From and Return-Path addresses, the administrator's language, how WordPress sends (mail() or SMTP, the SMTP host and plugin name, never a password), and the mail server's answer if it refused the email, with addresses removed.
* For the domain check: the domain, the SMTP host, and the administrator's email address if it is on the same domain (proposed as the DMARC report address).
* Only if monitoring is switched on: the sender address and subject of each email the site sends, so the service can tell which kinds are new, and a full copy of the first email of each new kind. For emails the site failed to send: their number, the plugin that sent them and the server's answer, with addresses removed. Copies are deleted after two days and their reports after 90 days. Those reports are private to the site.

Anyone with the link can open a test report. The terms are at https://email-spam-tester.com/terms/ and the privacy policy at https://email-spam-tester.com/privacy/.

== Installation ==

1. Install and activate the plugin.
2. Go to **Email Spam Tester** in the admin menu and press **Connect this site**.
3. Choose an email and press **Send the test**. The report appears on the same page within a minute or two; the folder check takes about half an hour.

== Frequently Asked Questions ==

= Does it change my DNS or my email settings? =

No. It shows the records to add at your DNS provider, with a Copy button. Your SMTP plugin's settings are only read.

= Does monitoring change the emails my site sends? =

The original email goes out unchanged. A separate copy goes to a private address at Email Spam Tester through the same `wp_mail()`, without Cc or Bcc recipients and without attachments.

= Will the folder check use my SMTP provider's quota? =

Yes: about 30 emails per test with the folder check, one without it.

= Does it work with my SMTP plugin? =

The test goes through `wp_mail()`, so whatever your SMTP plugin does to email, it does to the test. The plugin recognises the settings of WP Mail SMTP, FluentSMTP, Post SMTP and Easy WP SMTP, and the SMTP host of any plugin that uses PHPMailer.

= Multisite? =

Each site connects on its own and has its own history.

== Screenshots ==

1. The domain check and the records to add, with a Copy button.
2. A report: the score, the AI plan with WordPress-specific steps, and all 42 checks.
3. The folder at email providers for a WooCommerce order email.
4. History: scores over time and the checks that changed.
5. Monitoring: emails by the plugin that sent them, alerts and failures.

== Changelog ==

= 0.1.0 =
* First release: tests of WordPress and WooCommerce emails through wp_mail, the report, the folder check, the domain check, history, monitoring by plugin, Site Health, dashboard widget, WP-CLI.
