=== Mailsure Email Verification ===
Contributors: mailsure
Tags: email verification, email validation, woocommerce, spam, registration
Requires at least: 5.8
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 1.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Stop fake, mistyped and disposable email addresses at registration, WooCommerce checkout, comments and your form plugins.

== Description ==

Mailsure Email Verification checks every email address people give your site against the Mailsure verification API, and refuses the ones that can never receive mail: malformed addresses, domains that do not exist or accept no email, and (optionally) disposable and shared role addresses.

**Where it checks**

* WordPress registration
* WooCommerce checkout and My Account registration
* Comments from visitors who are not logged in
* Contact Form 7, WPForms, Gravity Forms and Elementor Pro forms (email fields)

**As the visitor types**

When they leave an email field, a short message appears under it ("Did you mean name@gmail.com?" with a one-click fix, or why the address cannot be used). The server checks again on submit, so this is only a convenience.

**Built so it never gets in the way**

* If Mailsure cannot answer (network trouble, no credits, wrong key) the address is accepted. A verification service should never be the reason a customer cannot check out.
* Results are cached for a day, so the same address is never charged twice.
* Addresses you list under "Always allow these domains" are never checked.
* Unknown results are never billed by Mailsure.

**You need a Mailsure account**

Every account includes free verifications each month, no credit card required. Create one at https://mailsure.co/signup, then create an API key under API keys in the dashboard. This plugin sends the email address being checked to Mailsure; see https://mailsure.co/privacy.

== Installation ==

1. Upload the plugin and activate it, or search for it under Plugins > Add New.
2. Go to Settings > Mailsure and paste your API key.
3. Choose what to block and where to check. Use "Try an address" to test your settings.

== For developers ==

`mailsure_check_email( $email )` returns `array( 'allow' => bool, 'code' => string, 'message' => string, 'suggestion' => ?string )`.

Filters: `mailsure_should_check` (return false to skip an address), `mailsure_enqueue_script` (return false to turn off the as-you-type script on a page), `mailsure_api_url` (point at another Mailsure host, or define `MAILSURE_API_URL`).

== Frequently Asked Questions ==

= Does it cost credits to check an address? =

One credit per address that Mailsure can give a verdict on. Malformed addresses and unknown results are free, and repeat checks of the same address within a day are served from the cache.

= What happens when I run out of credits? =

Checks pause and addresses are accepted unchecked. A notice appears in your dashboard. Nothing breaks.

= Does it check that the mailbox exists? =

It confirms the address is well-formed and that its domain can receive mail, flags disposable and role addresses, and asks the mail server whether the mailbox exists (this works for Gmail, Hotmail/Outlook and most company servers). Yahoo, iCloud and Proton throttle these checks, so for those the mailbox is reported as not checked.

= My page is cached and the as-you-type message does not appear. =

The check uses a security token that expires after a day. Clear your page cache, or make sure it is rebuilt daily. Checking on submit is unaffected.

== Changelog ==

= 1.0.0 =
* First release.
