=== RadarAddress for Contact Form 7 ===
Contributors: radarwave
Tags: contact form 7, 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 Contact Form 7 submission verified, typos corrected; address autocomplete and verification in the forms you map.

== Description ==

RadarAddress checks the email address of every submission of every Contact Form 7 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: the «RadarAddress» tab in the form editor), 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 email (Mail 1), in the mail tags `[_radaraddress_email_outcome]`, `[_radaraddress_email_original]`, `[_radaraddress_outcome]`, `[_radaraddress_address]` and `[_radaraddress_reason]` for whoever wants them in a precise place, and in the messages saved by Flamingo if the site uses it.

**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: notification body, Reply-To, the autoresponder, Flamingo.
* 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. Contact Form 7 → Integration → RadarAddress: paste the token and press «Verify and save». The emails are verified from now on; to verify addresses too, map the fields in the «RadarAddress» tab of the form.

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. Contact Form 7 6.0 or later is required.
3. Contact Form 7 → Integration → RadarAddress: paste your API token and press «Verify and save».
4. Optional, for the addresses: open a form, «RadarAddress» tab, choose which fields are the street, the postcode, the city, the province and the country.

== 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 Contact Form 7.

= Do I have to configure the fields? =

Not for the emails: every email field of every form is verified. For the addresses yes: the «RadarAddress» tab of the form editor, five menus.

= Where do I see the outcome? =

At the end of the notification email you receive (Mail 1), as a short block. If you prefer a precise place, use the mail tags listed in the settings. With Flamingo the outcomes are also in the saved message.

= 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 (reply address, Flamingo), the original is kept in the notification, 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 Contact Form 7 → Integration → 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 Contact Form 7 → Integration: token, email and address switches, countries, this month's usage.
4. The «RadarAddress» tab of the form editor: 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, outcomes in the notification email, in mail tags and in Flamingo, settings in the Integration page.
