# WordPress plugin

**Werkmail SMTP** is the official plugin in the WordPress plugin directory: [wordpress.org/plugins/werkmail](https://wordpress.org/plugins/werkmail/). It points PHPMailer at Werkmail, so every plugin that sends through `wp_mail()` is covered, including contact forms, password resets, order confirmations and invoice mail.

Current version **1.0.1**. The plugin requires WordPress **6.2** or newer and PHP **8.0** or newer. It is the client for the sending service described in [SMTP submission](/smtp-submission); without a Werkmail login it does nothing and WordPress keeps using its own mail path.

## Install

1. In the WordPress admin open **Plugins**, then **Add New**.
2. Search for **Werkmail SMTP**, press **Install Now**, then **Activate**.
3. If the site cannot search the directory, download the ZIP from the plugin page and upload it under **Plugins**, **Add New**, **Upload Plugin**.

WordPress keeps its own mailer, the plugin only sets the SMTP credentials. Deactivating it returns the site to PHP mail, without a migration and without a second plugin to remove.

## Set it up

Create the login in the workspace first, as described under [SMTP submission](/smtp-submission): open **SMTP logins**, choose a label such as `WordPress`, and copy the password immediately, it is shown once.

Then open **Settings**, **Werkmail SMTP** and fill in:

| Setting | Value |
| --- | --- |
| Host | `smtp.werkmail.eu` |
| Port | `587` with STARTTLS, or `465` with TLS from the first byte |
| User name | the login from the workspace |
| Password | the password shown when the login was created, or the `WERKMAIL_SMTP_PASSWORD` constant in `wp-config.php` |
| Sender address | an address on a domain verified in this workspace |

Unencrypted submission is not offered. Both ports are encrypted and behave the same afterwards, so use whichever one the host allows. Give every site its own login: revoking one login does not touch the others, and the change takes effect on the next connection.

## Test mail and troubleshooting

Press the test button on the settings page. It sends one message to the address you enter and keeps the answer from the server, so a failure is readable instead of guessed.

Common causes, in the order they usually appear:

- **Wrong port.** A host that blocks outbound 465 answers with a timeout. Try 587 with STARTTLS, or the other way round.
- **Sender domain not verified.** Werkmail answers `550 Sender domain not verified`. Verify the domain in the workspace or move the sender address to a domain that is already verified.
- **Suppression list.** The recipient had a hard bounce or a complaint before, so the message is held. The suppression entry carries the reason.
- **Content gate.** The content check refused the message, for example an executable attachment. Send a document as PDF instead.

Every accepted message appears in the workspace message list. The [dashboard deliverability page](https://werkmail.eu/app/metrics/deliverability) shows bounces, complaints, refusals and the reason for each one, which is how a "the form works but no mail arrives" question is answered in one look.

## What the plugin does not do

The plugin sends transactional mail from WordPress. Campaigns, consent and the preference center stay in Werkmail, where the choice is recorded, where double opt-in is checked and where a recipient can change it later. For newsletters, scheduled campaigns and per-recipient statistics, use a broadcast in Werkmail, not a `wp_mail()` loop.

## The same pipeline as the API

Every message the plugin submits runs through the same pipeline as a message sent over the API, including the suppression list, safe mode, the content gate, warm-up and the workspace quota. A message the API refuses is refused here too, with the same reason.
