=== UWH SMTP Connect ===
Tags: smtp, email, email-logs, mail, email-delivery
Requires at least: 6.2
Requires PHP: 7.4
Stable tag: 1.2.3
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Configure your own SMTP server, send test emails, troubleshoot delivery, and keep privacy-first email logs. Free and open source.

== Description ==

UWH SMTP Connect provides a focused SMTP transport for WordPress using the PHPMailer library included with WordPress. Enter the connection settings supplied by your mail host, optionally enforce a consistent sender address, and test your connection in a straightforward admin interface.

The plugin does not supply an email account or SMTP server. Use your own provider's SMTP credentials. Your hosting provider may restrict external SMTP ports.

**Included in version 1.2.3:**

* Standard authenticated SMTP, including TLS/STARTTLS and SSL/SMTPS.
* Unauthenticated SMTP where permitted by the server. Authenticated SMTP without transport encryption is deliberately blocked.
* From Email and From Name overrides, with an optional return path.
* Premium, mobile-friendly branded HTML test emails, with a plain-text alternative for text-only clients.
* Send accepted/failed status logging, including a short redacted failure reason.
* Clearable local logs with scheduled 7/14/30/90-day retention and a 500-entry cleanup cap.
* Credential encryption at rest (AES-256-GCM via PHP OpenSSL, derived from WordPress security salts).
* Read-only configuration checks and a DNS deliverability checklist.
* Responsive administrator-only dashboard and a plugin-list Settings shortcut.
* Local SMTP presets for Gmail / Google Workspace, Brevo and SendGrid, with provider-specific setup guidance (no remote API requests).
* Acceptance rate for logged send attempts, accurate connection-ready indicator, and accessible form interaction enhancements.
* A more consistent Overview page with a standard white panel layout and refined action button styling.
* AJAX filtering and pagination for Email Logs, with loading feedback and Back/Forward navigation (JavaScript fallback to normal links).
* Google provider setup includes a direct shortcut to the official Google App Passwords page; requires an eligible Google Account with 2-Step Verification.

**Privacy & security**

Email log entries store only timestamps, transport, recipient counts, result status, and redacted error messages. Email addresses, email subjects, message bodies, and attachments are not stored in these logs. The configured email provider receives normal outgoing emails and may retain data separately. This plugin does not send usage analytics or make its own telemetry requests. Changing WordPress authentication salts can make previously saved SMTP credentials undecryptable; re-enter the SMTP password afterwards.

Log cleanup is handled by WP-Cron and depends on WP-Cron running. The plugin does not guarantee final inbox delivery: accepted mail means only that the transport processed the send request without reporting an error.

**External service disclosure**

This plugin sends messages only when WordPress triggers an email or an administrator explicitly sends a test email. When enabled, it uses the SMTP host and account that *you configure*; the plugin does not connect to a proprietary UWH server. The third-party SMTP provider receives the email (which can include recipients, subject, body and attachments), authentication information needed for sending, and connection metadata. Transmission and data handling are governed by the email provider that you choose.

For example, if you configure Google Gmail / Google Workspace SMTP, review Google's [Privacy Policy](https://policies.google.com/privacy) and [Terms](https://policies.google.com/terms). If you use Microsoft Outlook / Microsoft 365 email services, review [Microsoft Privacy](https://privacy.microsoft.com/en-us/privacystatement) and [Microsoft Services Agreement](https://www.microsoft.com/en-us/servicesagreement). If you use another provider, consult their applicable privacy and service terms before connecting.

This first release uses ordinary SMTP credentials or provider-approved app passwords, **not Google or Microsoft OAuth**. Providers which disable password-based SMTP cannot be connected until a supported method is configured outside this plugin.

**Provider presets in 1.2.2**

Google, Microsoft 365, and Others are available as direct provider choices in SMTP Settings. Choosing Google automatically uses `smtp.gmail.com` and changes the password field label to App Password. Microsoft 365 uses `smtp.office365.com`; this is a standard SMTP preset, not a Microsoft OAuth connection, and SMTP AUTH may be restricted by your Microsoft tenant. Both choices initially set port 587 and TLS when selected. Others allows editing the hostname and works with all other SMTP hosts. Existing saved SMTP configurations are preserved during upgrades. Google and Microsoft trademarks belong to their respective owners; this plugin is not affiliated with or endorsed by them. Provider marks are only used to help identify the setup option.

== Installation ==

1. Upload `uwh-smtp-connect` to `/wp-content/plugins/`, or install the plugin ZIP in Plugins > Add New > Upload Plugin.
2. Activate UWH SMTP Connect.
3. Open **SMTP Connect > SMTP Settings** in your WordPress dashboard.
4. Enter your email provider's SMTP host, port, encryption, From Email, username, and password/app password.
5. Enable SMTP sending, then save settings.
6. Open **Test Email** to send a message to an email address you control.
7. If the test fails, consult **Email Logs** and **Diagnostics**; verify your provider credentials and the hosting firewall.

== Frequently Asked Questions ==

= Is this plugin free? =

Yes. All features in version 1.2.3 are free, with no license gate or trial limit. Your SMTP provider might charge for sending email.

= Does it work with WooCommerce or contact forms? =

It changes the PHPMailer transport used by normal calls to WordPress `wp_mail()`. Many popular plugins use `wp_mail()`; plugins that bypass it may not be affected.

= Does it include Gmail OAuth? =

No. The initial release supports standard SMTP authentication only. Gmail account eligibility and app password support depend on Google account policies.

= Why did a successful test not arrive? =

The SMTP transport may accept mail without delivering it to the inbox. Check spam, SPF/DKIM/DMARC, provider policies, recipient filtering, and server restrictions.

= Where do the SMTP credentials go? =

The SMTP password is stored encrypted in WordPress options and decrypted on your site only when sending. The key depends on WordPress security salts in `wp-config.php`; changes to salts require re-entering the password. Your SMTP provider receives authentication data as part of the connection.

= Is it compatible with another SMTP plugin? =

Run only one plugin that actively configures PHPMailer SMTP. Multiple simultaneous SMTP transport hooks can conflict or unexpectedly override configuration.

= What is removed when I uninstall? =

Plugin options, the SMTP password, and the local email log table are removed on plugin deletion. Deactivation by itself preserves settings and data.

== Changelog ==

= 1.2.3 =
* Add an official Google Create App Password shortcut beside the Google provider guidance, visible only when Google is selected.
* Keep existing SMTP settings and provider behavior unchanged.

= 1.1.2 =
* Shorten the “Great news” introduction in the premium HTML test email.
* Reduce the test email hero heading to 26px on screens up to 640px, with refined line height and letter spacing.

= 1.1.1 =
* Redesign test-delivery emails with a professional blue UWH SMTP Connect brand header, received-message confirmation, site and test details, and clear, responsible deliverability guidance.
* Use a self-contained, table-based, responsive HTML template with no external graphics, fonts, trackers, or remote dependencies.
* Provide a real plain-text alternative through a test-only PHPMailer hook, keeping regular site emails and content-type handling unchanged.
* Update the admin Test Email help text to describe the improved delivery-test message.

= 1.1.0 =
* New SMTP provider quick setup for Gmail, Brevo and SendGrid (username/key remains administrator-entered).
* Add a logged-attempt acceptance-rate summary (not an inbox-delivery measurement).
* Treat undecryptable saved credentials as needing attention rather than claiming the SMTP transport is ready.
* Do not clear saved encrypted credentials simply when SMTP authentication is toggled off.
* Refine form accessibility, password controls, mobile navigation, notifications and layout, empty log states and form feedback.
* Ensure STARTTLS behavior matches the selected encryption option.

= 1.0.1 =
* Match the header banner to the overview blue gradient.
* Keep third-party WordPress/Elementor notifications outside the plugin banner.
* Improve header contrast and responsive presentation.

= 1.0.0 =
* Initial release with custom SMTP, TLS/SSL, encrypted credentials, sender controls, test email, diagnostics, private logging, and a responsive dashboard.
