=== MevvMail ===
Contributors: mevvsoft
Tags: smtp, email, email log, mailer, woocommerce
Requires at least: 6.0
Tested up to: 7.1
Requires PHP: 8.1
Stable tag: 1.0.6
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Reliable email delivery for WordPress and WooCommerce: connection failover, a local email log and order-level visibility.

== Description ==

WordPress hands every email to the server's own `mail()` function, which is
unauthenticated. Mailboxes treat that mail as suspicious, and when it is
refused nobody is told: `wp_mail()` returns false, the page carries on, and
the password reset or the order confirmation is simply gone.

MevvMail takes delivery over. It sends through an authenticated connection you
configure, records every attempt in a local log, retries the ones that fail,
and shows the delivery status of a WooCommerce order right on the order
screen.

= Delivery connections =

A connection is one way out: an SMTP server, or one of eight API providers.
You can add as many as you like and give each a priority. MevvMail walks the
list in priority order and stops at the first connection that accepts the
message. If your main provider is rate limiting, out of quota or down, the
next one sends the email instead of it being lost.

When every connection refuses, the attempt is written to the log as failed and
retried three times — after one minute, five minutes and thirty minutes.

= Email log =

Every attempt is recorded: time, recipients, subject, status, which connection
handled it and which part of the site produced it. You can filter by status,
by source and by date, and resend any entry.

Storing the message body is optional and on by default; turning it off logs
only the headers. Make that choice deliberately, because it costs two things.
An email logged without its body cannot be resent by hand, and a failed send
is not retried automatically either: the one, five and thirty minute retries
have no body to send, so the failure is recorded and goes no further.

Log retention is your choice: 7, 30, 90 days, or forever.

= WooCommerce =

With WooCommerce active, each order screen gets a box listing the emails that
order produced, with their delivery status. When something goes wrong you can
see it against the order instead of hunting through a log.

MevvMail works exactly the same on a site without WooCommerce; the order box
is simply not there.

= Providers included, at no cost =

SMTP, PHP `mail()`, Brevo, SendGrid, Mailgun, Postmark, SparkPost,
Elastic Email, SMTP2GO and Resend. All of them are in this free plugin, with
no feature locked behind a licence and no send limit imposed by us. You use
your own account and your own API key with each provider.

= Attachments: SMTP only =

**The eight API providers do not send attachments in version 1.0.0.** This is
a deliberate limit, not a bug: each of those APIs wants attachments in a
different shape, and shipping eight half-tested encoders was not worth it.

If an email carries an attachment and the connection is an API provider,
MevvMail refuses that connection permanently for that message and moves to the
next one in the list. So the practical rule is: **keep one SMTP connection in
the chain and attachments keep working**, because SMTP sends them normally.
With no SMTP connection configured, an email with an attachment is logged as
failed rather than delivered without its file.

= Your email stays yours =

Message content is sent to the provider you configured and nowhere else. There
is no telemetry, no licence call, no analytics, no content scanning and no AI
of any kind in this plugin. The log lives in your own database.

== Installation ==

1. Upload the `mevvmail` directory to `/wp-content/plugins/`, or install the
   zip through Plugins > Add New.
2. Activate MevvMail.
3. Open MevvMail > Connections and add your first connection. Until you do,
   WordPress keeps sending email its own way — nothing is taken over by
   accident.
4. Press "Send test email" and confirm it arrives.
5. Optional: add a second connection with a lower priority as a fallback.

== Frequently Asked Questions ==

= Can I send attachments? =

Through an SMTP connection, yes. Through the eight API providers, not in
version 1.0.0 — see "Attachments: SMTP only" above. Keep an SMTP connection in
your chain and emails with attachments go out through it.

= Do I need an account with one of the providers? =

You need one authenticated way out. That can be an SMTP server you already
have — your host's, your mailbox provider's, or a sending service — or a free
account with one of the API providers. MevvMail does not resell sending and
takes no part in your account with them.

= What happens if my provider goes down? =

The next connection in priority order sends the email. If all of them refuse,
the attempt is logged as failed and retried after one minute, five minutes and
thirty minutes. Those retries resend the stored body, so they only happen while
"Store the email body" is on; with it off a failed send is logged and left at
that.

= Are retries reliable? =

They are as reliable as WP-Cron, which is what schedules them. WP-Cron only
runs when someone visits the site, so on a quiet site a retry can happen later
than the minute it was scheduled for. If that matters to you, replace WP-Cron
with a real server cron the usual way (`DISABLE_WP_CRON` plus a `wp-cron.php`
call from crontab). Nothing in MevvMail needs changing for that.

= Does the plugin store my email content? =

Only if you leave "Store the email body" on, and only in your own database. It
is never transmitted anywhere except to the provider you configured for
delivery.

Turning it off is a real trade, not a free win: without a stored body an entry
cannot be resent by hand, and a failed send never enters the automatic retry
schedule either, because there is nothing left to send. Weigh that against your
own privacy obligations.

= Does uninstalling delete my log? =

No, not unless you ask for it. There is a setting on the Settings screen that
opts in to removing the log table and all settings when the plugin is deleted;
it is off by default.

= Is a licence key needed? =

No. Every provider and every feature described here works in the free plugin
with no key.

== External services ==

MevvMail contacts a third-party service in exactly two situations, and both
are described below.

**1. The email provider you configure.**

Sending an email means handing it to somebody who can deliver it. Nothing is
sent to any provider until you create a connection of that type, and only that
provider receives the message.

* Brevo — `https://api.brevo.com/v3/smtp/email`.
  Terms: https://www.brevo.com/legal/termsofuse/ ·
  Privacy: https://www.brevo.com/legal/privacypolicy/
* SendGrid (Twilio) — `https://api.sendgrid.com/v3/mail/send`.
  Terms: https://www.twilio.com/en-us/legal/tos ·
  Privacy: https://www.twilio.com/en-us/legal/privacy
* Mailgun — `https://api.mailgun.net/v3/<your-domain>/messages`, or
  `https://api.eu.mailgun.net/...` if you pick the Europe region.
  Terms: https://www.mailgun.com/legal/terms/ ·
  Privacy: https://www.mailgun.com/legal/privacy-policy/
* Postmark — `https://api.postmarkapp.com/email`.
  Terms: https://postmarkapp.com/terms-of-service ·
  Privacy: https://postmarkapp.com/privacy-policy
* SparkPost — `https://api.sparkpost.com/api/v1/transmissions`, or
  `https://api.eu.sparkpost.com/...` if you pick the Europe region.
  Terms: https://www.sparkpost.com/policies/tou/ ·
  Privacy: https://www.sparkpost.com/policies/privacy/
* Elastic Email — `https://api.elasticemail.com/v4/emails/transactional`.
  Terms: https://elasticemail.com/resources/usage-policies/terms-of-use/ ·
  Privacy: https://elasticemail.com/resources/usage-policies/privacy-policy/
* SMTP2GO — `https://api.smtp2go.com/v3/email/send`.
  Terms: https://www.smtp2go.com/terms-of-service/ ·
  Privacy: https://www.smtp2go.com/privacy/
* Resend — `https://api.resend.com/emails`.
  Terms: https://resend.com/legal/terms-of-service ·
  Privacy: https://resend.com/legal/privacy-policy

What is sent: the sender name and address, the To, Cc and Bcc addresses, the
subject, the message body, the Reply-To address if there is one, any custom
headers the email carries, and your own API key in the request header so the
provider can authenticate you. Nothing else is added by MevvMail — no site
address, no user account data, no identifier of ours.

When it is sent: each time WordPress produces an email and that connection is
the one that handles it, and when you press "Send test email" on the
Connections screen.

An SMTP connection works the same way except that the destination is the SMTP
server whose address, port and credentials you type in. That server is chosen
and operated by you or your provider; MevvMail sends the message and the
credentials you entered to it and nothing else. SMTP is also the only
connection type that carries attachments.

**2. The MevvMail update endpoint at mevvsoft.com.**

Endpoint: `https://mevvsoft.com/api/v1/license/free-update`
Terms: https://mevvsoft.com/mesafeli-satis ·
Privacy: https://mevvsoft.com/kvkk

What is sent: two values only — the plugin slug (`mevvmail`) and the version
number installed on your site. No site address, no email address, no licence
key, no user data, no list of your plugins, no usage statistics.

When it is sent: when WordPress runs its own plugin update check and the
cached answer is older than twelve hours. The reply is signed and an unsigned
or badly signed reply is discarded.

This request exists so that a copy downloaded from mevvsoft.com learns about
security updates. **The copy distributed through the WordPress Plugin
Directory does not contain the updater file at all** — that build gets its
updates from WordPress.org and never contacts us.

== Privacy ==

The publisher receives no email content, no recipient addresses, no log
records, no usage analytics and no personal data from this plugin. The email
log is a table in your own database and you control how long it is kept, and
whether message bodies are kept at all.

Because the log can contain personal data, review your retention setting and
the "Store the email body" option against your own obligations before you go
live. Note what turning the body off costs you: no resend by hand, and no
automatic retry of a failed send.

== Changelog ==

= 1.0.6 =

* Fix: the "Send again" button in the order screen's email box is now a link. Its hidden form fields were merged into the order form and stopped "Update" from saving the order.

= 1.0.5 =

* MevvCore 1.0.4: licence, updates and menu now served by the shared kernel; product page under the Mevv menu.

= 1.0.4 =

* Embeds the shared MevvCore kernel.

= 1.0.3 =

* The order box's "more entries" line is no longer ungrammatical when one
  entry is left over. The box shows the first page of an order's emails and
  then a line pointing at the log for the rest; that line was written with a
  single fixed string, so an order with exactly one further email read "1
  more entries are visible on the email log screen." The string now carries a
  singular and a plural form, which also means translators can give it the
  plural rules their own language needs — a string without a plural block
  could not be fixed in any translation.

= 1.0.2 =

* The "Store the email body" setting now states the second thing it costs.
  Turning the body off was documented as "a logged email cannot be resent",
  which was only half of it: a failed send also never enters the automatic
  retry schedule, because the one, five and thirty minute attempts have no
  body left to send. The behaviour is unchanged and it is the correct one:
  an email without a body cannot be retried. But it was written nowhere, so
  a shop that turned the body off for privacy quietly lost automatic retries
  and only found out when an order email went missing. The settings screen,
  the email log section, the FAQ and the privacy section now say both
  consequences.

= 1.0.1 =

* The log's Source column is now filled in for WooCommerce emails. The column,
  its filter and the order box all read this field, but nothing wrote it: it
  was only set when the sender added an `X-MevvMail-Kaynak` header, so in
  practice it was always empty. A sender's own header still wins; MevvMail
  only fills the gap.
* The order box stylesheet is now loaded on the order screen. It was queued
  only on MevvMail's own pages, so the box rendered unstyled and the subject
  ran into the delivery status on one line.

= 1.0.0 =

* First release.
* `wp_mail()` delivery through prioritised connections with automatic
  failover.
* SMTP and PHP `mail()` connections, plus Brevo, SendGrid, Mailgun, Postmark,
  SparkPost, Elastic Email, SMTP2GO and Resend.
* Local email log with status filtering, source filtering, date filtering,
  optional body storage, configurable retention and resend.
* Failed sends retried after one minute, five minutes and thirty minutes.
* WooCommerce order screen shows the emails that order produced and their
  delivery status.
* The log records which WooCommerce email a message was, so a delayed retry
  still knows what it is sending.
* The log table can be extended with extra columns through the
  `mevvmail_gunluk_sutunlari` and `mevvmail_gunluk_satir_sutunlari` filters.
* The log table is recreated if it is missing, even when the stored schema
  version is already current.
* Interface available in Turkish, Spanish, German, French, Portuguese,
  Italian, Dutch, Japanese, Russian and Polish, with eight further country
  variants.

== Upgrade Notice ==

= 1.0.0 =
First release.
