Home / Admin / Defining General Settings Constants
Duplicate Snippet

Embed Snippet on Your Site

Defining General Settings Constants

Every constant in this section can be used for any mailer because they’re not specific to any one mailer option.

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
php
<?php
/* Defining General Settings Constants  
 * 
 * Original doc: https://wpmailsmtp.com/docs/how-to-secure-smtp-settings-by-using-constants/
*/
define( 'WPMS_LICENSE_KEY', '' ); 
define( 'WPMS_MAIL_FROM', '[email protected]' );
define( 'WPMS_MAIL_FROM_FORCE', true ); // True turns it on, false turns it off.
define( 'WPMS_MAIL_FROM_NAME', 'Example Name' );
define( 'WPMS_MAIL_FROM_NAME_FORCE', true ); // True turns it on, false turns it off.
define( 'WPMS_MAILER', 'smtp' ); // Possible values: 'mail', 'gmail', 'mailgun', 'sendgrid', 'smtp'.
define( 'WPMS_SET_RETURN_PATH', true ); // Sets $phpmailer->Sender if true.
define( 'WPMS_DO_NOT_SEND', true ); // Possible values: true, false.

Comments

Add a Comment