=== Meser10 Mailer ===
Contributors: meser10
Tags: smtp, wp_mail, email delivery, deliverability, transactional email
Requires at least: 5.7
Tested up to: 7.1
Requires PHP: 7.2
Stable tag: 1.0.1
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Send the email WordPress generates through your Meser 10 account instead of the server's own mail function.

== Description ==

WordPress sends a lot of email that nobody thinks about until it stops arriving: password resets, new user notifications, order confirmations, form notifications. By default all of it goes out through the web server's own mail function, from whatever address the host happens to use. That mail has no sending reputation behind it, and it is the mail most likely to land in spam or be dropped silently.

Meser10 Mailer routes those messages through your [Meser 10](https://www.meser10.co.il/) account instead, so they leave from a domain with a real sending reputation.

= What this plugin sends, and what it deliberately does not =

The Meser 10 message endpoint accepts one recipient, a subject, a body, a sender display name and a Reply-To address.

It has no field for attachments, CC or BCC. Rather than quietly dropping them, this plugin hands any message using them straight back to WordPress, which sends it exactly as it would have without the plugin. Nothing is lost, and the email log records which route every message took and why.

The sending address is the one attached to your Meser 10 account. A `From` header set by your site can change the sender's display name, but not the address - that is the point of routing mail here.

= Requires an account =

The plugin is a connector. It does nothing without a Meser 10 account and an API key. Nothing else needs to be arranged in advance - it works with an existing account as it is.

One thing worth knowing: a standard Meser 10 account adds campaign chrome to the messages it sends - a view-in-browser link, an unsubscribe footer and a "sent via Meser" line. That is right for a newsletter, and some sites would rather not have it on a password reset. It is an account-level setting on Meser 10's side, so ask their support if you want it switched off.

== External services ==

This plugin sends outgoing email through Meser 10 (mesereser.com), an Israeli email and SMS marketing platform, and requires an account there.

When a message is routed through Meser 10, the recipient address, subject, message body, sender display name and Reply-To address are sent over HTTPS to the Meser 10 JSON API at `heb.mesereser.com`, authenticated with a single API key stored as a WordPress option. Nothing is transmitted while routing is switched off or while no API key is saved.

* Meser 10 terms of use: https://www.meser10.co.il/terms/
* Meser 10 privacy policy: https://www.meser10.co.il/privacy/

== Installation ==

1. Install and activate the plugin.
2. Go to **Settings &rarr; Meser 10 Mailer**.
3. Paste the API key from your Meser 10 account (User Settings screen) and save.
4. Send a test message to yourself and confirm it arrives.
5. Tick **Route WordPress email through Meser 10** and save again.
6. Optional: if you would rather your site's mail went out without the campaign footer, ask Meser 10 support to switch that off for the account.

== Frequently Asked Questions ==

= My test message arrived with an unsubscribe footer. Can I remove it? =

Yes, through Meser 10. A standard account appends a view-in-browser link, an unsubscribe footer and a "sent via Meser" line to the messages it sends. It is an account-level setting on their side rather than something this plugin controls, so contact Meser 10 support and ask them to switch it off for the account whose API key you saved here.

= Will my order emails with a PDF invoice still work? =

Yes. Any message with an attachment is handed back to WordPress and sent the way it always was. The email log shows it as "passed to WordPress" with the reason.

= Can I set a custom From address? =

No, and that is deliberate. The sending address belongs to your Meser 10 account. Sending as an address the account is not authorised for is what breaks SPF and DKIM alignment, which is the problem this plugin exists to solve. You can set the sender display name and a Reply-To address.

= What happens if Meser 10 is unreachable? =

The failure is recorded in the email log and reported to WordPress as a failed send, which fires the standard `wp_mail_failed` action that other plugins listen for.

= Does this work alongside Meser10 Connect? =

Yes. They do different jobs - Connect sends form entries to your contact lists, this sends the site's own email. If Connect is installed and already has an API key, this plugin reuses it so you do not have to paste it twice.

= Is this an SMTP plugin? =

Not literally. It does not open an SMTP connection; it hands each message to Meser 10 over its HTTPS API. The effect is the one people want from an SMTP plugin - site email leaving through a reputable service instead of the local mail function - without SMTP credentials to store.

== Changelog ==

= 1.0.1 =
* Clearer wording on the settings screen and in this readme about the campaign footer: it is an optional account-level setting on Meser 10's side, not something to arrange before installing.

= 1.0.0 =
* First release. Routes wp_mail() through Meser 10 with an explicit fallback to WordPress for attachments, CC and BCC, plus an email log and a test send.
