=== Country Email Router ===
Contributors: qevorasoftware
Tags: elementor, email, email routing, contact form, country
Requires at least: 5.8
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 1.1.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Routes Elementor Pro form submissions to different recipients based on the selected country.

== Description ==
Country Email Router adds a custom Elementor Pro form action that sends each form submission to a country-specific email address. Unmapped countries use the configured fallback address.

== Installation ==
1. Upload the `country-email-router-for-elementor` folder to `/wp-content/plugins/`.
2. Activate Country Email Router from the WordPress Plugins screen.
3. Edit an Elementor Pro form.
4. Remove Elementor's built-in Email action from Actions After Submit.
5. Add the Country Email Router action.
6. Set the country field ID, fallback email, subject, and optional country-to-email map. Global country routing is managed from **Settings → Country Email Router**.
7. Save the form and submit a test enquiry for a mapped and an unmapped country.

== Configuration ==
Routing defaults are stored in `config/settings.php` and `config/email-map.php`. Per-form values configured in Elementor override those defaults.

Multiple To, CC, and BCC addresses are supported. In the Elementor override textarea, add one route per line. Multiple addresses are comma-separated:

    Belgium|sales@example.com,manager@example.com|cc@example.com|bcc@example.com
    United States|sales.usa@example.com

== Requirements ==
* WordPress 5.8 or later.
* PHP 7.4 or later.
* Elementor and Elementor Pro.

= 1.1.5 =
* Corrected settings notice placement so the page description stays directly below the title and the save notice appears beneath the description.

== Changelog ==
= 1.1.0 =
* Added a WordPress admin settings page with searchable country routing.
* Added multiple To recipients per country.
* Added CC and BCC support per country.
* Added duplicate-country prevention.
= 1.1.4 =
* Improved the admin header and saved-settings notice layout.

= 1.1.3 =
* Added a WordPress admin settings page with a searchable country dropdown.
* Changed the default routing country to Canada.
* Improved country selector layout and button alignment.
* Removed unsupported heredoc/nowdoc syntax from admin code.

= 1.0.0 =
* Initial release.
