=== RadarAddress for WPForms ===
Contributors: radarwave
Tags: wpforms, email verification, address autocomplete, address validation, email validation
Requires at least: 6.4
Tested up to: 7.1
Requires PHP: 8.1
Stable tag: 1.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

The email of every WPForms submission verified, typos corrected; address autocomplete and verification in the forms you map.

== Description ==

RadarAddress checks the email address of every submission of every WPForms form, with nothing to configure beyond the API token: an unmistakable typo in the domain (gmial.com, hotmal.com…) is corrected and you receive the reply address that works, with the original kept; an address that cannot receive mail (a domain that does not exist, a disposable mailbox) is flagged, and refused with a message under the field only if you switch that on. The visitor who made a typo reads the corrected address in the confirmation message.

In the forms where you map the address fields (street, postcode, city, province, country: Settings → RadarAddress in the form builder; with the Address field of WPForms Pro, just choose it), the address completes and corrects itself while the visitor types, from the national address registers of 25 European countries, and is verified on submission: outcome and verified form arrive to you. The visitor's fields are never rewritten and nothing ever blocks the submission.

Where the outcomes go: at the end of the notification emails (not the ones sent to the visitor), and in the smart tags `{radaraddress_email_outcome}`, `{radaraddress_email_original}`, `{radaraddress_outcome}`, `{radaraddress_address}` and `{radaraddress_reason}` for whoever wants them in a precise place.

**What you get**

* Every email field of every form verified: syntax, domain that receives mail, disposable mailbox, role address (info@, office@…), unmistakable typo corrected.
* The corrected address wherever the email is used: the Reply-To of the notifications and the notifications sent to the visitor.
* Address autocomplete and correction on the field in the mapped forms, in the countries where the national address register is in service.
* Verification of the address on submission, with the verified form and the reason.
* Verification precision from strict to maximum: how far RadarAddress goes to find an address written badly.
* Fail-open by design: if RadarAddress does not answer, the submission goes through as usual.
* Data stays in the EU. Sources: the national address registers, published as open data.

**How it works**

1. Create a free account on radaraddress.com (every month 500 light checks and 50 contact checks are free).
2. Create an API token in your personal area.
3. WPForms → RadarAddress: paste the token and press «Verify and save». The emails are verified from now on; to verify addresses too, map the fields in Settings → RadarAddress of the form builder.

One light check is used per email verified; one contact check per address verified (typing is free; a selection from the suggestions and the verification of the same address count once). For most sites the free checks of the month are all they need; beyond that, packs and monthly subscriptions on radaraddress.com.

**Third-party service**

This plugin sends the email address and, in the mapped forms, the address typed in the form to the RadarAddress API (https://www.radaraddress.com) to get verification results and suggestions. Terms: https://www.radaraddress.com/en/contratto.php — Privacy: https://www.radaraddress.com/en/privacy-policy.php

== Installation ==

1. Upload the plugin folder to `/wp-content/plugins/` or install the zip from Plugins → Add New → Upload.
2. Activate it. WPForms Lite or Pro 1.9 or later is required.
3. WPForms → RadarAddress: paste your API token and press «Verify and save».
4. Optional, for the addresses: open a form in the builder, Settings → RadarAddress, choose which fields are the street, the postcode, the city, the province and the country (or the Address field of WPForms Pro).

== Frequently Asked Questions ==

= Does it block the submission? =

Never for the address. For the email only if you switch it on: then an address that cannot receive mail, or a role address, is refused with a message under the field, like any other validation error of WPForms.

= Do I have to configure the fields? =

Not for the emails: every email field of every form is verified. For the addresses yes: Settings → RadarAddress in the form builder, five menus (one, with the Address field of WPForms Pro).

= Where do I see the outcome? =

At the end of the notification emails you receive, as a short block. If you prefer a precise place, use the smart tags listed in the settings.

= Does it change what the visitor wrote? =

The address fields, never: you receive what was typed and, next to it, the verified form. The email, only for an unmistakable typo in the domain and only if the option is on: the corrected address replaces the original where it is used (the reply address, the emails to the visitor), the original is kept in the notification and in the entry, and the visitor reads the corrected address in the confirmation message.

= How much does it cost? =

The plugin is free. One light check per email verified, one contact check per address verified. Every month the first 500 light checks and 50 contact checks are free. Beyond that, packs and monthly subscriptions on radaraddress.com.

= What if RadarAddress is down? =

The submission goes through as usual, with no message to the visitor; the notification says «not verified».

== External services ==

This plugin connects to the RadarAddress API, a service run by RadarWave (the author of this plugin), to verify email addresses and to suggest and verify postal addresses. It does nothing until you paste your own API token in WPForms → RadarAddress.

* **What is sent and when:** when a form is submitted, the email address typed in the email fields is sent to be verified; in the forms where you have mapped the address fields, the address typed (street, house number, postcode, city, province, country) is sent while the visitor types, to get suggestions, and on submission, to be verified. Your API token is sent with every request to identify your account. The settings page also asks the API for your account's remaining checks.
* **Where:** https://www.radaraddress.com/api/v1/ (calls are made by your site's server, or through the plugin's own REST endpoint on your site: the token never reaches the browser).
* **Terms of use:** https://www.radaraddress.com/en/terms
* **Privacy policy:** https://www.radaraddress.com/en/privacy-policy

== Screenshots ==

1. The notification email: the RadarAddress block with the email corrected and the address verified.
2. The form: the street completes while the visitor types, with the register source at the bottom of the popup.
3. The settings in WPForms → RadarAddress: token, email and address switches, countries, this month's usage.
4. Settings → RadarAddress in the form builder: which fields hold the address.

== Changelog ==

= 1.0.0 =
* First release: email verification on every submission (typos corrected, addresses that cannot receive mail flagged or refused), address autocomplete and verification in the mapped forms (text fields, or the Address field of WPForms Pro), outcomes in the notification emails and in smart tags.
