Plugin
SMTP Mailer & Mail Logging
Send WordPress email through your own SMTP server, and keep a log of what was sent. Authenticated password storage, no external service.
/**
Plugin header
- Plugin name:
- SMTP Mailer & Mail Logging – EPAS
- Version:
- 1.0.0
- Requires at least:
- 6.4
- Requires PHP:
- 7.4
- Languages:
- English, Lietuvių
- License:
- GPL-2.0-or-later
- Download size:
- 60 KB
*/
What it does
- The password is encrypted before it is stored, with a key derived from the security keys in your
wp-config.php. Those keys are not in the database, so a stolen database backup on its own does not reveal it — and the field never shows the saved password back to you, so the secret is not sitting in the HTML of an admin screen. - Or keep it out of the database entirely. Define
EPAS_SMTP_PASSWORDinwp-config.phpand it takes precedence, with the field disabling itself — the right choice on a version-controlled or multi-environment site. - A test email that tells you what went wrong — on failure it shows the server's own reply, which is what separates a wrong password ("Could not authenticate") from a blocked port ("Connection refused").
- An email log, as much or as little as you want: off, failures only (the default), or every email your site sends — with the recipient, subject, status and which plugin sent it. Never the message body, so it cannot become a copy of every password-reset link and invoice on your site.
- The log is bounded by both a day limit (30 by default) and a row cap (500), and because recipient addresses are personal data it is wired into WordPress' own personal-data export and erase tools, with suggested privacy-policy wording included.
- Pick the encryption and the port comes with it — STARTTLS on 587, SSL/TLS on 465, none on 25 — as three radio buttons matching the three lines in your provider's documentation. A port you type yourself is never overwritten.
- Optional force From — one verified sender address and name on every email, so plugins that hardcode
wordpress@yourdomainstop tripping SPF and DMARC. - Every setting can also come from
wp-config.phpconstants, which is what you want on a version-controlled or multi-environment site; the screen then shows those fields read-only.
Questions
Where is my SMTP password kept, exactly?
In its own row in the options table, encrypted with AES-256 using a key derived from the AUTH_KEY and AUTH_SALT in your wp-config.php. Those are not in the database, so a database dump on its own is not enough to read it. Two caveats the settings screen states plainly: if your site does not define those constants, WordPress keeps the salts in the database and this becomes obfuscation rather than protection; and encryption at rest protects nobody from someone who already has admin or file access. To keep the secret out of the database completely, define EPAS_SMTP_PASSWORD in wp-config.php — it wins, and nothing is written.
I moved my site and email stopped working.
The security keys in wp-config.php changed during the move, and the encryption key is derived from them — so the saved password can no longer be read. The screen says exactly that; type the password again and save.
Is there one-click Gmail or Outlook sign-in?
No, and that is deliberate: OAuth requires calling an external API to exchange tokens, and every plugin in the EPAS plugins family promises zero external HTTP requests. Use an app password instead — Google, Microsoft, Zoho and Fastmail all issue them, and you can revoke one without touching your account password.
What if another SMTP plugin is already active?
This one steps aside completely and says so in one dismissible notice. Two plugins configuring the same mailer means whichever hooks last wins, which is how sites end up with silent delivery failures. It keeps logging failures, because that stays useful.
Does the log store the emails themselves?
No — never the message body. An entry holds the date, recipient, subject, status, the error if it failed, and which plugin triggered the send. That answers "did it go out, and whose email is broken?" without duplicating every password-reset link and invoice into your database.
Can it send through a relay that needs no login?
Yes — leave the username empty and the plugin sends without authenticating, for a trusted server on your own network or a local mail catcher. Any provider on the internet needs a username, and then the password constant is required too.
How to get it
This plugin is finished and being prepared for the WordPress.org plugin directory. Until it is published there, email us and we will send you the current zip.