=== MailSlurp Email Testing for WooCommerce ===
Contributors: mailslurp
Tags: email testing, woocommerce, email preview, smtp, inbox placement
Requires at least: 7.1
Tested up to: 7.1
Requires PHP: 8.3
Requires Plugins: woocommerce
Stable tag: 1.0.0
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Preview WooCommerce order emails across email clients and check inbox placement through your store's configured mailer.

== Description ==

Test a fictional Processing order email from WooCommerce > Email testing. Choose device screenshots or inbox placement, review the test, and send through the store's configured WordPress mailer.

* Device screenshots in Gmail, Apple Mail, Outlook and other supported clients, with availability shown in the selector.
* Inbox, spam and junk observations from test mailboxes.
* Automatic result updates, a subject-searchable test history, and columns or grid screenshot views.
* Connection checks and actionable messages for credentials, account allowance and billing issues.

A MailSlurp account and API key are required. MailSlurp is an external paid service with account-dependent included allowance. Installing this plugin does not purchase a subscription. Test availability, included allowance and usage charges depend on the connected account. View [MailSlurp plans](https://app.mailslurp.com/upgrade/) before testing.

Placement tests reserve allowance when a fresh run is created, even if the store mailer later fails. Every new test uses its own remote run and tracking token, including stores sharing one MailSlurp account. Reopening a saved test reads its results and never resends its email. After an uncertain handoff, inspect the saved test and mailer's logs before creating another test.

= External service and data =

The plugin connects to https://api.mailslurp.com after you configure an API key and open Email testing or use its controls. It sends the API key in an authenticated server-side header to verify access, retrieve available clients, check allowance, create test recipients and retrieve results. MailSlurp supplies temporary screenshot links; authenticated administrators can open those images from MailSlurp's approved image hosts.

When you confirm a test, WooCommerce generates a sample Processing order using fictional customer/order details. The email includes your configured store branding, sender information, template content and links. The plugin sends that email through your store's existing mail transport to MailSlurp's test address or seed mailboxes. Review your template and any extensions that customize it before sending. The plugin does not select real customer orders, change order statuses or send to their recipients. No tracking or analytics code is added to the storefront.

Test IDs, subjects, client choices, delivery states and result metadata are saved in this WordPress site's options table. Remote results belong to the connected MailSlurp account and follow that account's retention rules. Store owners should include this testing service in their privacy notices where appropriate.

[MailSlurp service and pricing](https://www.mailslurp.com/)
[Terms of service and privacy policy](https://legal.mailslurp.com/)
[MailSlurp support](https://www.mailslurp.com/contact/)

== Installation ==

1. Install and activate WooCommerce 11.3 or later on WordPress 7.1 or later, with PHP 8.3 or later. This release was tested with WooCommerce 11.3.0 and WordPress 7.1.4.
2. Upload and activate this plugin using Plugins > Add New Plugin > Upload Plugin.
3. Create or sign in to your MailSlurp account at https://app.mailslurp.com/ and create an API key. A restricted key needs READ_EMAIL permission.
4. Add `define( 'MAILSLURP_API_KEY', 'your-api-key' );` to wp-config.php before the line that loads WordPress. Keep this server-side file private. Never put the key in an email template, screenshot or public repository.
5. Open WooCommerce > Email testing > Connection and choose Check connection. The check verifies the account and access to email results. Changing the configured key requires another check.
6. Configure your normal WordPress mail transport. Verify an ordinary store email can be sent first. The plugin uses this transport; it does not replace your SMTP settings.
7. Open New test, select the test type and clients if applicable, and review the send. Test history opens the saved result with automatic updates.

== Frequently Asked Questions ==

= Does it send an actual customer order? =

No. It generates WooCommerce's fictional Processing order preview. Custom template extensions can add their own content, so review them first. Recipient and attachment restrictions apply only while sending a test; ordinary mail afterward retains its configured recipients.

= Which mailers have been tested? =

The live pilot used PHPMailer with an authenticated SMTP2GO relay. Compatibility checks also use WP Mail SMTP's Other SMTP transport and FluentSMTP's SMTP transport with a local SMTP sink. These checks cover unwanted To/Cc/Bcc recipients, attachments and an ordinary email sent after the test. API-mailer input isolation is checked at the WordPress pre_wp_mail boundary. Other provider-specific API transports have not all been certified.

= Can several stores use the same MailSlurp account? =

Yes. Each new placement test creates a fresh run instead of reusing the dashboard's staged preparation. Each site retains its own local history. Account allowance is shared. An account key is account-wide, so use separate accounts where separate account-level access is required.

= What happens when allowance runs out? =

A MailSlurp upgrade-required response displays an upgrade banner with the MailSlurp upgrade link and Check account again. After adjusting the account, return to the saved result and recheck. A test blocked before sending stays unsent; start a new test explicitly. Billing, invalid-key, permission and rate-limit errors have separate recovery actions. This plugin never upgrades or charges a card itself.

= Why can a test remain waiting? =

An accepted mailer handoff does not prove receipt. Check the store mailer's delivery logs, then reopen the saved result. Automatic updates pause while the browser tab is hidden and back off after temporary failures. With JavaScript disabled, Refresh results is available. Do not resend an uncertain test blindly.

= Does uninstalling remove results? =

Uninstall removes this site's plugin test history, result metadata, cached connection state and temporary plugin caches. It does not delete your MailSlurp account or remote tests, cancel a subscription, or edit wp-config.php. Remove MAILSLURP_API_KEY from wp-config.php yourself if no longer needed. Deactivating retains local results.

== Changelog ==

= 1.0.0 =
* Initial directory release: device screenshots, isolated placement runs, automatic updates, test history and account recovery.
