=== Werkmail SMTP ===
Contributors: sebastiankh
Tags: smtp, email, transactional email, deliverability, email delivery
Requires at least: 6.2
Tested up to: 7.1
Requires PHP: 8.0
Stable tag: 1.0.1
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Sends WordPress mail through Werkmail over SMTP, encrypted on port 587 or 465.

== Description ==

WordPress sends mail through PHP's mail function by default, which lands in spam or disappears. This plugin points PHPMailer at Werkmail, so password resets, order confirmations and form notifications leave the site through a real sending service.

**What it does**

* Replaces the WordPress mail path, so every plugin that uses `wp_mail()` is covered without configuration.
* Uses port 587 with STARTTLS, or port 465 with TLS from the first byte. Unencrypted submission is not offered.
* Keeps the last failure on the settings page, so a shop operator can see what the server answered instead of guessing.
* Optionally forces the sender address, because Werkmail only accepts a verified domain.
* Reads the password from `WERKMAIL_SMTP_PASSWORD` in `wp-config.php` when you prefer not to store it in the database.

**What it does not do**

* No marketing mail. Newsletters belong in Werkmail itself, where consent, segments and unsubscribe are handled properly.
* No open relay and no fallback to the local mail server when Werkmail is unreachable. A silent fallback is how a store ends up with half its order mails missing.

== Privacy ==

The plugin stores two things on the site: the settings (host, port, login, password, sender address) in the options table, and the last failure message so an operator can read it. Both stay in the site database and are removed on uninstall.

Nothing is sent anywhere except to Werkmail when a mail is being delivered. There is no telemetry, no usage statistics and no call to any other server.

== External services ==

This plugin connects to Werkmail, an email sending service operated by Werkmail (https://werkmail.eu). It sends the message content, the sender address, the recipient addresses and the login credential to `smtp.werkmail.eu` over TLS.

* Terms of service: https://werkmail.eu/terms
* Privacy policy: https://werkmail.eu/privacy

An account is required. Without a Werkmail login the plugin does nothing and WordPress keeps using its own mail path.

== Installation ==

1. Upload the `werkmail-smtp` folder to `/wp-content/plugins/`, or install the zip through Plugins, Add New.
2. Activate the plugin.
3. Open Settings, Werkmail SMTP.
4. Enter the user name and password from Werkmail, under SMTP in your workspace. Pick port 587 or 465.
5. Set the sender address to a domain verified in Werkmail.
6. Save, then send a test mail to yourself.

== Frequently Asked Questions ==

= Do I need a Werkmail account? =

Yes. The plugin is a client for the Werkmail sending service.

= Which port should I use? =

587 with STARTTLS works almost everywhere. Some hosts block outbound 465, in which case 587 is the answer. Both are encrypted.

= Why is mail refused with "Sender domain not verified"? =

Werkmail only sends for domains you verified. Add the domain in Werkmail under Domains, or change the sender address to one you already verified.

= What happens when Werkmail is down? =

`wp_mail()` returns false and the reason appears on the settings page. The plugin does not silently fall back, because a fallback hides the problem until a customer complains.

= Does it work with WooCommerce? =

Yes. WooCommerce sends through `wp_mail()`, so orders, invoices and password resets are covered. Set the sender under WooCommerce, Settings, Emails to the same verified domain.

= Is the password stored in the database? =

By default yes, in the WordPress options table, like any other plugin setting. If you prefer, define `WERKMAIL_SMTP_PASSWORD` in `wp-config.php`; the constant wins and the database no longer holds it.

== Screenshots ==

1. Settings page with port choice, login and test mail button.

== Changelog ==

= 1.0.1 =
* Text domain now matches the plugin slug (werkmail), so the plugin can be translated from the directory.
* Contributor list corrected to the submitting account.

= 1.0.0 =
* First release: PHPMailer through Werkmail, ports 587 and 465, sender override, test mail, last failure on the settings page.
