=== HULO Email Tracking ===
Contributors: huloglobal
Tags: email log, email tracking, bounce, suppression list, wp_mail
Requires at least: 6.5
Tested up to: 7.1
Requires PHP: 8.1
Stable tag: 0.1.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Log every e-mail your WordPress site sends, catch bounces and complaints, and keep a suppression list. Works with WooCommerce too.

== Description ==

HULO Email Tracking keeps a record of every e-mail your WordPress site sends through `wp_mail()`: password resets, new-account e-mails, contact-form notifications, plugin e-mails, everything.

Works on any WordPress site. With WooCommerce it also names each WooCommerce e-mail (new order, processing, completed, refunded, invoices…), links it to its order and customer, and adds an "E-mails sent" box to the order screen (HPOS and legacy order storage). With HULO Payments it links receipts and payment e-mails to the payment.

**What the free plugin does**

* **E-mail log.** Date, e-mail type, recipient, subject, delivery status and what it was about, with filters by status, type, recipient, customer, order/payment and date.
* **Delivery status.** Failed sends are marked with the mail error. Every message gets its own Message-ID so your mail provider's reports can be matched to it.
* **Bounce and complaint webhook.** Point your mail provider at the signed webhook (HMAC-SHA256, rate limited). Hard bounces and complaints mark the e-mail and add the address to the suppression list; soft bounces are recorded without suppressing anyone.
* **Suppression list.** See, search, add and remove addresses.
* **Dashboard widget** with the last seven days.
* **Retention.** The log is pruned daily in small batches (365 days by default, optional row cap), through Action Scheduler when available and WP-Cron otherwise.
* **Privacy tools.** Works with WordPress's Export and Erase Personal Data tools and suggests text for your privacy policy.
* **Safe public endpoints.** Tracking links are signed together with their destination, so they cannot be used as an open redirect; an optional host allowlist adds a second check. Network addresses are only ever stored as a salted one-way hash.

The plugin sends nothing anywhere: no account, no external service, no data leaves your site.

= HULO Email Tracking Pro =

The [Pro add-on](https://huloglobal.com/wordpress-plugins/email-tracking/) adds:

* Open tracking (a 1×1 image) and click tracking (signed redirect links) in HTML e-mails, with a per-e-mail history of opens and clicks: e-mail program, country, bot and prefetch detection, never the raw IP address. Unsubscribe and opt-out links are never rewritten.
* Open rate, click rate and click-to-open rate per e-mail type.
* CSV export of the filtered log.
* Sending that skips addresses on the suppression list (password-reset e-mails always go out).
* A weekly report e-mail and a setup checklist.

Try Pro free for 14 days, no card.

== Installation ==

1. Install "HULO Email Tracking" from Plugins → Add New, or upload the zip, and activate it.
2. Go to HULO → Email Tracking. Every e-mail sent from now on appears in the log.
3. Optional: in Settings, set a bounce webhook secret and give your mail provider the webhook address shown there.

== Frequently Asked Questions ==

= Do I need WooCommerce? =

No. It logs every e-mail on any WordPress site. WooCommerce only adds order and customer links and the order-screen box.

= Does it work with my SMTP plugin? =

Yes, as long as it sends through `wp_mail()`, which almost every SMTP and mail-API plugin does.

= Which e-mails are labelled? =

WordPress account e-mails (password reset, new account, password and address changes, core updates), every WooCommerce e-mail when WooCommerce is active, and HULO Payments e-mails when that plugin is active. Everything else is logged as "Other WordPress e-mail".

= What does the bounce webhook expect? =

A POST of JSON `{"messageId": "…", "status": "bounced" | "complained", "bounceType": "hard" | "soft", "reason": "…"}` to `/wp-json/hulo-email-tracking/v1/bounce`, with the HMAC-SHA256 of the raw body (hex, optionally prefixed `sha256=`) in the `X-Signature` header, keyed with the secret from the settings. Without a secret the webhook is switched off.

= Is any data sent to HULO or anyone else? =

No. The free plugin makes no outbound connections.

= Can other plugins label their e-mails? =

Yes: `do_action( 'hulo_email_tracking_context', array( 'type' => 'my-email', 'to' => $address ) );` just before calling `wp_mail()`.

== Screenshots ==

1. The e-mail log with status cards and filters.
2. One e-mail in detail.
3. The "E-mails sent" box on a WooCommerce order.
4. Settings.

== Changelog ==

= 0.1.0 =
* First release: log of every WordPress e-mail, bounce and complaint webhook, suppression list, dashboard widget, retention, privacy export and erasure; with WooCommerce, e-mail names, order and customer links and an order-screen box; with HULO Payments, e-mails linked to payments.
