=== Meow Mailer ===
Contributors: TigrouMeow
Tags: smtp, email, mailer, email log, deliverability
Requires at least: 6.5
Tested up to: 7.0
Requires PHP: 7.4
Stable tag: 0.1.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Reliable WordPress email through the provider of your choice, with a beautiful log, offline mode, and one-click resend. Simple by design.

== Description ==

WordPress email is unreliable out of the box. **Meow Mailer** fixes it: pick one provider, set it up once, and every email your site sends is routed through it — and logged, so you always know what happened.

No bloat, no upsell maze. Just the features 95% of sites actually need, free.

= Highlights =

* **One provider, set up once.** Choose the one you use and forget about it — no confusing multi-provider routing.
* **Stays out of the way by default.** Until you pick a provider, Meow Mailer doesn't touch your email at all — activating it never breaks what already works.
* **Beautiful email log.** Every email in a clean table: recipient, subject, provider, and status (sent / failed / offline / pending). Click any row to read the full message, see errors, and resend it.
* **Never miss a failure.** A dashboard warning appears when emails fail, so silent delivery problems don't go unnoticed.
* **Background sending.** Send emails after the page has loaded, so your visitors never wait on the mail server.
* **Offline mode.** Capture every email in the log without sending — perfect for staging and development sites.
* **Filters & export.** Filter the log by status and provider, search by subject or recipient, and export to CSV.
* **Test email & resend.** Verify your setup with an HTML or plain-text test, and resend any logged message in one click.
* **Auto-prune.** Keep logs forever or automatically delete entries older than 7, 30, or 90 days.
* **Light & private.** No bloat, no tracking, no upsell maze. Credentials can live in `wp-config.php` instead of the database.

= Supported providers =

Generic SMTP, Mailgun, Brevo, SendGrid, Amazon SES, Postmark, SMTP2GO, Mailjet, Resend, MailerSend, Gmail / Google Workspace (OAuth 2.0), and Microsoft 365 / Outlook (OAuth 2.0).

= About Meow Apps =

Meow Mailer is part of the Meow Apps family of plugins, focused on doing one thing well with a clean, modern interface.

== Installation ==

1. Upload the `meow-mailer` folder to `/wp-content/plugins/`, or install it from the Plugins screen.
2. Activate the plugin.
3. Open the **Meow Mailer** menu in your WordPress admin, go to the **Settings** tab, choose your provider and enter its credentials.
4. Send a test email to confirm everything works. Watch the **Logs** tab.

== External services ==

Meow Mailer only contacts an external service once you choose and configure an email provider in its settings. Until then (the default "None" provider), it sends nothing anywhere.

When you select a provider, your outgoing email — recipients, subject, body and any attachments — together with the credentials you entered, are sent to that provider's API (or SMTP server) so the message can be delivered. You decide which single provider is used; no other provider is ever contacted. This happens only when your site sends email. In "Offline" mode, emails are kept in the local log and nothing is sent at all.

The data sent to the selected provider is your outgoing email's recipients, subject, body, headers and any attachments, plus the credentials you configured, sent only at the moment your site sends an email. For the Gmail and Microsoft 365 options, Meow Mailer also contacts the provider's OAuth server when you connect your account and when it refreshes the access token. No analytics, telemetry, or other data is ever sent.

The providers you can choose from, and their terms of service and privacy policies:

* Generic SMTP — connects to the SMTP server you configure (your own choice of host). No third-party service is involved beyond the server you specify.
* Mailgun — Terms: https://www.mailgun.com/legal/terms/ — Privacy: https://www.mailgun.com/legal/privacy-policy/
* Brevo — Terms: https://www.brevo.com/legal/termsofuse/ — Privacy: https://www.brevo.com/legal/privacypolicy/
* SendGrid (Twilio) — Terms: https://www.twilio.com/en-us/legal/tos — Privacy: https://www.twilio.com/en-us/legal/privacy
* Amazon SES — Terms: https://aws.amazon.com/service-terms/ — Privacy: https://aws.amazon.com/privacy/
* Postmark — Terms: https://postmarkapp.com/terms-of-service — Privacy: https://postmarkapp.com/privacy-policy
* SMTP2GO — Terms: https://www.smtp2go.com/terms/ — Privacy: https://www.smtp2go.com/privacy/
* Mailjet — Terms: https://www.mailjet.com/legal/terms/ — Privacy: https://www.mailjet.com/legal/privacy-policy/
* Resend — Terms: https://resend.com/legal/terms-of-service — Privacy: https://resend.com/legal/privacy-policy
* MailerSend — Terms: https://www.mailersend.com/legal — Privacy: https://www.mailersend.com/legal/privacy-policy
* Gmail / Google Workspace (via Google OAuth) — Terms: https://policies.google.com/terms — Privacy: https://policies.google.com/privacy
* Microsoft 365 / Outlook (via Microsoft OAuth) — Terms: https://www.microsoft.com/en-us/servicesagreement — Privacy: https://privacy.microsoft.com/en-us/privacystatement

== Source code and build process ==

The admin interface is written in React. The compiled bundles `app/index.js` and `app/vendor.js` are generated from the human-readable source code included in this plugin under the `app/js/` directory.

* Build tool: webpack, run via pnpm. The configuration is in `webpack.config.js` (included).
* To rebuild from source: run `pnpm install` then `pnpm build` in the plugin directory.
* `app/index.js` is built from this plugin's own source in `app/js/`.
* `app/vendor.js` contains third-party open-source libraries (such as React and ReactDOM) collected by webpack at build time; their source is published by their respective projects on npm.

All source files and the build configuration ship inside the plugin, so the compiled assets can be inspected and regenerated.

== Frequently Asked Questions ==

= Can I use more than one provider at a time? =

No — and that's on purpose. One active provider keeps configuration simple and predictable. You can switch provider any time in Settings.

= Does it store my email password? =

For SMTP and API providers, credentials are stored in the WordPress database. You can instead define them as PHP constants in `wp-config.php` (e.g. `MWMAIL_SMTP_PASSWORD`) to keep them out of the database. Gmail uses OAuth 2.0, so no password is ever stored.

= What does Offline Mode do? =

When enabled, no email is sent. Every message WordPress tries to send is recorded in the log instead. Ideal for staging sites where you don't want real emails going out.

= Will it work with WooCommerce / contact form plugins? =

Yes. Meow Mailer intercepts WordPress's standard `wp_mail()`, which is what those plugins use.

= What does Background Send do? =

When enabled, the page is returned to your visitor immediately and the email is sent a moment later in the background, so a slow mail server never slows down your site. The email shows as "Pending" in the log, then updates to Sent or Failed.

= How do I connect Gmail or Microsoft 365? =

Both use OAuth 2.0, so no password is stored. Create an OAuth app (Google Cloud Console for Gmail, Azure Portal for Microsoft 365), paste the Client ID and Secret into the provider settings, add the shown redirect URI to your OAuth app, then click Connect.

== Changelog ==

= 0.1.0 =
* First release.
* Providers: Generic SMTP, Mailgun, Brevo, SendGrid, Amazon SES, Postmark, SMTP2GO, Mailjet, Resend, MailerSend, Gmail (OAuth), Microsoft 365 / Outlook (OAuth).
* Email log with content preview, status, filters, search, CSV export, and one-click resend.
* Offline mode, background sending, dashboard failure warnings, HTML/plain test emails, and automatic log pruning.
