Adds a simple mail configuration panel into your WordPress installation. Supports temporary logging and config variables.
Adds a simple, no-fuss SMTP settings to your WordPress installation that lets you define custom settings, which is especially useful for hosts with no control over the php mail
functionality.
If logging is enabled, a new segment in the settings panel will show up with a 30-day overview of recent emails, and will automatically prune older logs. Please see the FAQ if you want a more permanent solution.
For more information, please see the project wiki on GitHub.
This plugin will prefer environmental and constant-stored values over the plugin-saved equivalent settings, making it easier to use this plugin via deployment.
These can be either stored in your systems env setup, or in wp-config.php as define( 'SEE_BELOW', 'your_value_here' );
.
SMTP_HOST
(string) Mail server hostname.SMTP_PORT
(integer) Port address (usually 25, 465 or 587).SMTP_AUTH
(integer, 1 or 0) Pass below credentials to your mail server.SMTP_USER
(string) The mail username for this account.SMTP_PASS
(string) The password for the mailer account.SMTP_FROM
(string) Enforce all emails come from this email address.SMTP_FROMNAME
(string) Enforce all emails to have a certain email name.SMTP_SEC
(string) Use a particular email security method (accepts ‘def’ (default), ‘ssl’, ‘tls’ and ‘off’).SMTP_NOVERIFYSSL
(boolean) Disable validation of the SMTP server certificate (not recommended).SMTP_LOG
(boolean) Controls the logging capability and visibility.SMTP_DISABLE
(boolean) Disables the mailer. They will still be logged if enabled, but won’t send out.It is recommended to store at least SMTP_PASS
in your wp-config.php file (with the correct file permissions set). If the openssl extension is available, the plugin will attempt to encrypt the password in the database.
This plugin works by instructing PHPMailer – the mail library WordPress have chosen – to use SMTP mode, and adds in the settings you choose. 9 times out of 10, the error messages you receive are configuration errors. PHPMailer provides a good guide to help you figure out these problems.
The one instance where an SMTP error can be caused by this plugin is if the SMTP password is stored in the database when the secret keys have been regenerated. You will need to re-save the password to refresh the encryption keys.
You can always get assistance from your host and/or SMTP service provider.
When using the logging functionality, the plugin will store the logged emails in the posts table, as an invisible post type. Normally this should work completely fine, but if you have a plugin that scans custom post types and sends an email about them, there’s a chance the third-party plugin might get stuck in a loop. For plugins like this, it is best to disable the functionality on the logging post type (sbss_email_log).
The following plugins have had reported issues:
* Sucuri Security.
This plugin supports being overridden by DEFINE, so please check to see that you are not setting a define for a WP Simple SMTP option. These are most commonly stored in the wp-config.php file.
The over-ride hierachy is as follows, with top being the most important.
The logs by default will auto-prune to avoid keeping sensitive details in logs and contributing to database bloat. But if you wish to keep the logs more permanently, then register the following hook (typically in your theme functions.php) to disable the auto-pruning functionality:
add_filter( 'simple_smtp_disable_log_prune', '__return_true' );
If openssl is available to PHP, then the password will be encrypted (not hashed) when stored in the database. If unavailable, the SMTP password will be saved into the database as plaintext. The more recommended way of storing the password is to define SMTP_PASS in your wp-config.php file, which should already be locked and inaccessible from the front-end.
Note: Multisite over-ride password is currently not encrypted. Please see this issue.
This can be adjusted by the ‘simple_smtp_log_table_max_per_page’ filter. Returning an integer value to this filter hook will adjust the table page limit.
Yes. With WP-CLI you can perform the following actions:
email-log
View the log if enabled.email-test
Send a test email.To view the available options and help documentation, run wp help
or wp help <function name>
.
Yes. Each site can have unique settings, unless overriding is on. The network will use the main site settings, so network admin emails will show up in the main site log.
Since version 1.2, network-activating the plugin grants special configuration options for super administrators. This includes the ability to set overrides and configure site admin access.
To help diagnose disabled input boxes, when the WordPress site is in debugging mode, the input fields will show a small debug text to indicate where the setting came from.
Yes! Please see our GitHub repository here for writing issues and/or making pull requests.
One of the easiest aspects to contribute to is the SMTP quick configuration segment. If you wish to maintain this aspect, suggest a new setting, or report broken entries, see the SMTP quick config wiki page.
mail()
).