=== PureHost Send-Mails ===
Contributors: purehost
Tags: smtp, email, bounce, transactional email, newsletter
Requires at least: 6.4
Tested up to: 7.1
Requires PHP: 8.1
Stable tag: 1.0.7
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Sends all WordPress emails via send-mails.de and feeds bounces and complaints back into your newsletter plugin.

== Description ==

send-mails.de is a transactional email service sending from Germany. This plugin connects your WordPress website to it.

* **One-key setup.** Paste an API key from the send-mails.de customer portal; the plugin creates its own SMTP login and picks a verified sender address.
* **All emails of the website.** Contact forms, orders, password resets and newsletters sent with `wp_mail()` go through send-mails.de, encrypted and authenticated.
* **Bounces back into your newsletter tool.** Every 15 minutes the plugin fetches bounces and complaints and marks the addresses in MailPoet, The Newsletter Plugin, FluentCRM, Groundhogg, Icegram Express (Email Subscribers & Newsletters), Noptin and AcyMailing: hard bounces and complaints right away, soft bounces after three within 30 days (configurable). Other tools can use the `sendmails_ereignis` action.
* **Email log with delivery status.** Every email with recipient, subject, the plugin that sent it and its real status at the recipient: delivered, hard or soft bounce with the server response, complaint. Search, filters and, optionally, "Send again".
* **Quota and rates in the dashboard.** Monthly quota with forecast, bounce and complaint rate, sending rate and limits, deliveries per day, bounces by provider and reason.
* **Protection against abused forms.** If a plugin or theme suddenly sends far more emails than usual, for example because bots flood a contact form, further emails from that source are held until you decide: send, discard or always trust the source.
* **Warnings before your customers notice.** Email to the administrator when the quota reaches 80 or 100 %, the bounce or complaint rate approaches the limit, emails are held or stuck in the queue, or the sender domain is no longer verified. Plus a short weekly report on Mondays.
* **Safe during disruptions.** If send-mails.de is briefly unreachable, emails wait in a local queue and are retried for up to 24 hours. The plugin switches between the send-mails.de mail servers automatically.
* **Domain check, Site Health and WP-CLI.** DNS status of every sender domain with copy buttons, tests in Site Health and `wp sendmails` commands for agencies.
* **Guided setup** with test email and a self-test against two test mailboxes (delivery and bounce).

No open or click tracking. Recipients and subjects stay in the email log for 30 days by default (configurable, or not at all); email content only if you turn it on, for at most 7 days. Credentials are stored encrypted in the database or as constants in wp-config.php.

The plugin requires a send-mails.de account. Plans and ordering: [send-mails.de](https://send-mails.de/).

The user interface is in English; translations are provided through translate.wordpress.org.

== External services ==

This plugin connects to services operated by PureHost (send-mails.de), the email service it is made for. It does not work without them.

* **Mail sending (smtp.send-mails.de):** every email sent by WordPress after you turn on sending, including recipients, subject, content and attachments, is transmitted via SMTP (TLS, authenticated with your SMTP login) to the mail servers of send-mails.de for delivery. The plugin only connects to mail servers under send-mails.de. The test email and the self-test send emails only when you start them.
* **API (api.send-mails.de):** authenticated with your API key. When you save the key and during setup, the plugin sends the address of your website to create an SMTP login for it. Every 15 minutes and when you open the plugin pages, it retrieves your quota, statistics, verified domains, the mail servers to use, new bounce and complaint events (these contain the affected recipient addresses) and the delivery status of recently sent emails (identified by a random ID per email).
* **Customer portal (portal.send-mails.de):** the plugin pages only link to the portal. Nothing is transmitted unless you open a link yourself.

Terms of service: https://send-mails.de/agb.html
Privacy policy: https://send-mails.de/datenschutz.html

== Installation ==

1. Install and activate the plugin.
2. In the customer portal of send-mails.de, create an API key with the purpose “WordPress plugin”.
3. Open “send-mails.de” in the WordPress admin menu and follow the steps: API key, SMTP login (set up automatically), sender, test email, turn on sending.

Instead of the database, credentials can be stored in wp-config.php:

    define('SENDMAILS_SMTP_BENUTZER', '...');
    define('SENDMAILS_SMTP_PASSWORT', '...');
    define('SENDMAILS_API_SCHLUESSEL', 'sm_live_...');

WP-Cron runs on page views. On low-traffic sites a real cron job for wp-cron.php is recommended.

== Frequently Asked Questions ==

= Do I need a send-mails.de account? =

Yes. The plugin sends through send-mails.de and needs an API key or an SMTP login from the customer portal.

= Does it work with other SMTP plugins? =

It replaces them. Another plugin that takes over email sending (WP Mail SMTP, FluentSMTP, Post SMTP, Easy WP SMTP and others) is detected; for the common ones, "Switch now" takes over the sender, deactivates the old plugin (its settings stay) and turns on sending.

= What happens if send-mails.de is unreachable? =

Emails wait in a local queue and are sent again for up to 24 hours. Nothing is sent twice.

= Can I see whether an email has arrived? =

Yes. The email log shows every email with recipient, subject, the plugin that sent it and its status at the recipient (delivered, bounced with the server response, complaint). Recipients and subjects are kept for 30 days by default, or not at all if you choose so.

= What if a contact form is flooded by bots? =

If a plugin or theme suddenly sends far more emails than usual, further emails from it are held and the administrator gets an email. You decide whether to send or discard them. Newsletter tools are never held.

= What happens when the monthly quota is used up? =

You choose in the settings: stop sending, continue at a reduced pace, or continue normally. In the last two cases the overage is charged up to a cost cap you set, only after you have agreed to it.

= Does the plugin track opens or clicks? =

No.

= Is there WP-CLI support? =

Yes: `wp sendmails status`, `test`, `abgleich`, `warteschlange`, `protokoll` and `bremse`.

== Screenshots ==

1. Overview: quota, rates, sending per day, recent emails with delivery status, bounces and the domain check.
2. Statistics on par with the customer portal: key figures with trends, daily chart, rates against the limits, quota and costs.
3. Email log: every email with recipient, subject, source and delivery status, with the server response in the details.
4. Domain check: DNS entries of every sender domain with status and copy button.
5. Settings: API key, automatically set up SMTP login, sender and sender per source.

== Developers ==

* `do_action('sendmails_ereignis', $wirkung, $email, $ereignis)`: `$wirkung` is `bounced` or `beschwerde` (complaint).
* `apply_filters('sendmails_ref', $ref)`: content of the X-SendMails-Ref header.

== Changelog ==

= 1.0.7 =
* New name: PureHost Send-Mails (slug purehost-send-mails).
* Translations are delivered through translate.wordpress.org; no bundled language files.
* Input from $_SERVER sanitized in the Newsletter adapter.

= 1.0.6 =
* Text domain and folder name are now "send-mails", matching the plugin slug on WordPress.org.

= 1.0.5 =
* Readme: external services described by their public addresses only.

= 1.0.4 =
* New name: Send-Mails.
* Changelog of the versions before 1.0 moved to changelog.txt.

= 1.0.3 =
* Sender settings: the domain next to the @ is no longer cut off.

= 1.0.2 =
* Placeholders of the email log query passed one by one (Plugin Check).

= 1.0.1 =
* Code review for the WordPress.org directory: stricter input sanitising, fixed queries with placeholders for the email log filters.

= 1.0.0 =
* First stable release: email log with delivery status, protection against mass sending, warnings and weekly report, choice when the quota is used up, domain check, sender per source, email design, Site Health, WP-CLI and switching from other SMTP plugins in one click.
* Settings in separate tiles with a jump bar (Connection, Sender, Quota, Protection and warnings, Email log, Bounces and queue, WordPress notifications, Email design); the email log has its own form.
* Every sentence of a hint text starts on its own line; long sentences were shortened.

Older versions: see changelog.txt in the plugin folder.
