Home / Admin / Defining Email Log Constants
Duplicate Snippet

Embed Snippet on Your Site

Defining Email Log Constants

This snippet will prevent users from changing WP Mail SMTP settings in your WordPress admin area by setting up constants.

To get started, you’ll need to open your site’s wp-config.php file. Look for the line that reads:
/* That's all, stop editing! Happy publishing. */

Be sure to add any new code above this line.

Code Preview
/* Defining Email Log Constants  
 * Original doc: https://wpmailsmtp.com/docs/how-to-secure-smtp-settings-by-using-constants/
define ( 'WPMS_LOGS_ENABLED', true ); // True turns it on, false turns it off.
define ( 'WPMS_LOGS_LOG_EMAIL_CONTENT', true ); // True turns it on and stores email content, false turns it off.
define ( 'WPMS_LOGS_LOG_RETENTION_PERIOD', 0 ); // How long email logs should be retained before they are deleted, in seconds. To disable the log retention period and keep logs forever, set to 0.


Add a Comment