=== SMTPMaster Email Sender ===
Contributors: smtpmaster
Donate link: https://smtpmaster.com
Tags: smtp, email, mail, logging, tracking
Requires at least: 5.8
Tested up to: 7.0
Requires PHP: 7.4
Stable tag: 1.0.1
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html

Send WordPress email via SMTP or SMTPMaster API with local logs and optional tracking.

== Description ==

SMTPMaster Email Sender sends WordPress email through an administrator-configured SMTP server or the SMTPMaster API, verifies connections, and stores local delivery and tracking logs.

= Features =

* Choice of administrator-configured SMTP credentials or native SMTPMaster API delivery.
* API-key and SMTP connection verification.
* Test-email diagnostics.
* Local email logs and CSV export.
* Optional first-party open and click tracking, disabled by default.
* Periodic SMTPMaster API delivery-status synchronization when a verified and authorized API key is saved.
* Failed-email retry handling via WP-Cron.

The frontend arbitrary-send Gutenberg block and email-sending shortcodes are disabled in this WordPress.org release. Inactive event, template, and WooCommerce automation features are not advertised as active features.

== Installation ==

1. Upload the `smtpmaster-email-sender` folder to the `/wp-content/plugins/` directory.
2. Activate the plugin through the Plugins menu in WordPress.
3. Navigate to SMTPMaster in the admin menu.
4. Configure either SMTP credentials or SMTPMaster API delivery under SMTPMaster > Settings.

== External services ==

This plugin can connect to the SMTPMaster API when an administrator selects SMTPMaster API delivery, enters an API key, and authorizes the connection. A SMTPMaster account is not required when the administrator uses their own SMTP server.

API-key verification sends the configured API key, its visible prefix and non-reversible fingerprint, the WordPress site URL, and a plugin source identifier to the SMTPMaster API.

When the plugin connection is registered, it sends the API credentials and identifiers described above together with the WordPress site URL, WordPress administrator email address, plugin identifier, and plugin version.

When WordPress sends an email through SMTPMaster API mode, the plugin sends the sender name and email address, To, CC and BCC recipient addresses, subject, message body, message ID, site URL, and API authentication data. HTML messages are sent with an HTML body and a generated plain-text version. Plain-text messages are sent as plain text.

API delivery currently does not support attachments. Messages containing attachments are rejected locally rather than uploading the attachment to SMTPMaster. Reply-To addresses and arbitrary custom headers are not transmitted by the current API implementation.

When delivery-status synchronization is enabled, the plugin periodically sends recent message IDs, the site URL, plugin source identifiers, and API authentication data to retrieve delivery, bounce, complaint, or deferral statuses.

The SMTPMaster service is provided by SMTPMaster and operated by CloudWind Technologies LLP.

Terms of Service: https://smtpmaster.com/terms-of-use/
Privacy Policy: https://smtpmaster.com/privacy-policy/

Direct SMTP mode uses the administrator's selected SMTP server as an external mail service. The plugin sends normal email delivery data to that server, and attachments supplied to normal `wp_mail()` calls may be delivered through that selected SMTP server. Terms and privacy practices for a user-selected SMTP provider are controlled by that provider.

== Privacy and retention ==

The plugin stores local sender and recipient addresses, subjects, email bodies, message IDs, delivery and error statuses, API-key fingerprints, open timestamps, viewer IP addresses from `REMOTE_ADDR`, clicked URLs and timestamps, and failed-email retry queue contents.

Open tracking and click tracking are disabled by default and require administrator opt-in. Open counts are estimates because some mail clients block or preload tracking pixels. Click tracking uses signed public redirect URLs so recipients do not need a WordPress account or expiring WordPress nonce.

Local email and tracking logs are kept in the WordPress database so changing SMTP credentials or API keys does not hide or delete older history. The daily WP-Cron cleanup removes only stale completed or failed retry-queue jobs. Administrators may delete associated local records through WordPress personal-data erasure tools. Uninstall removes plugin database tables, saved API keys, SMTP passwords, plugin options, and scheduled plugin cron events.

Suggested privacy policy text: This site may use SMTPMaster Email Sender to deliver WordPress email. Depending on the administrator's settings, the plugin may store local email logs containing sender and recipient addresses, subjects, message bodies, message IDs, delivery/error status, open timestamps, viewer IP addresses, clicked URLs, and retry queue data. Optional open and click tracking are disabled by default. When SMTPMaster API delivery is enabled, email delivery data and API authentication data are sent to SMTPMaster. When custom SMTP delivery is enabled, email delivery data is sent to the configured SMTP provider.

== Frequently Asked Questions ==

= Is a SMTPMaster account required? =

No. A SMTPMaster account is required only for SMTPMaster API delivery. Custom SMTP mode uses the SMTP server chosen by the administrator.

= What data is sent in API mode? =

API mode sends API authentication data, site URL, sender and recipient addresses, CC and BCC addresses, subject, body, message ID, and plugin source identifiers to SMTPMaster.

= What is sent in custom SMTP mode? =

Custom SMTP mode sends normal email delivery data to the SMTP server configured by the administrator. Attachments supplied to normal `wp_mail()` calls may be delivered through that SMTP server.

= Are attachments supported? =

Attachments are supported by normal SMTP delivery through `wp_mail()`. SMTPMaster API mode currently rejects messages with attachments locally.

= How does tracking work? =

If enabled by the administrator, open tracking adds a small image to HTML email and click tracking rewrites HTTP/HTTPS links to signed public redirect URLs. Opens are estimates.

= Where are logs stored? =

Logs are stored in local WordPress database tables created by the plugin.

= How can tracking be disabled? =

Open and click tracking are disabled by default. Administrators can keep them disabled or turn them off in SMTPMaster > Settings.

= What happens to data on uninstall? =

Uninstall removes plugin tables, saved API keys, SMTP passwords, plugin options, and scheduled plugin cron events.

== Screenshots ==

No screenshots are included for this release.

== Changelog ==

= 1.0.1 =
* Security hardening: disabled public arbitrary email block and shortcode sending.
* Security hardening: signed tracking URLs and rejected tampered click destinations.
* Changed open and click tracking to disabled by default.
* Stopped rendering saved complete API keys and SMTP passwords in admin HTML.
* Allowed delivery-status sync for SMTP and API logs when a verified and authorized SMTPMaster API key is saved.
* Added external-service and privacy disclosures, personal-data export/erase support, uninstall cleanup, and retry-queue cleanup.

= 1.0.0 =
* Initial release.

== Upgrade Notice ==

= 1.0.1 =
Security and disclosure update. Public arbitrary email-sending block/shortcode features are disabled, tracking defaults to off, and saved secrets are no longer rendered in admin HTML.
