Title: Multisite Config Constants
Last modified: October 2, 2019

---

# Multisite Config Constants

 *  Resolved [Albert Bretado](https://wordpress.org/support/users/abretado1985/)
 * (@abretado1985)
 * [6 years, 8 months ago](https://wordpress.org/support/topic/multisite-config-constants/)
 * Hello,
 * I am hoping you can help me troubleshoot an issue.
    We’ve had this plugin working
   on multisite, but once we updated to 5.2.3 and updated our PHP to 5.6.40 the 
   emails are no longer working with constants defined. If I deactivate the constants
   then the individual site works with the settings I apply. So is it an issue with
   the constants? I double-checked the SMTP host information but no luck.
 * Here is what I have:
    define( ‘WPMS_ON’, on ); // True turns on the whole constants
   support and usage, false turns it off.
 * define( ‘WPMS_MAIL_FROM’, ‘donotreply@xxxxxx.com’ );
    define( ‘WPMS_MAIL_FROM_FORCE’,
   false ); // True turns it on, false turns it off. define( ‘WPMS_MAIL_FROM_NAME’,‘
   do not reply’ ); define( ‘WPMS_MAIL_FROM_NAME_FORCE’, false ); // True turns 
   it on, false turns it off. define( ‘WPMS_MAILER’, ‘smtp’ ); // Possible values:‘
   mail’, ‘sendinblue’, ‘mailgun’, ‘sendgrid’, ‘gmail’, ‘smtp’. define( ‘WPMS_SET_RETURN_PATH’,
   true ); // Sets $phpmailer->Sender if true, relevant only for Other SMTP mailer.
 * define( ‘WPMS_SMTP_HOST’, ‘xx.xx.xxx.xx’ ); // The SMTP mail host.
    define( ‘
   WPMS_SMTP_PORT’, 25 ); // The SMTP server port number. define( ‘WPMS_SSL’, ” );//
   Possible values ”, ‘ssl’, ‘tls’ – note TLS is not STARTTLS. define( ‘WPMS_SMTP_AUTH’,
   false ); // True turns it on, false turns it off. define( ‘WPMS_SMTP_USER’, ”);//
   SMTP authentication username, only used if WPMS_SMTP_AUTH is true. define( ‘WPMS_SMTP_PASS’,”);//
   SMTP authentication password, only used if WPMS_SMTP_AUTH is true. define( ‘WPMS_SMTP_AUTOTLS’,
   false ); // True turns it on, false turns it off.
 * Thank you,
    Albert

Viewing 7 replies - 1 through 7 (of 7 total)

 *  [Sanjeev Aryal](https://wordpress.org/support/users/sanzeeb3/)
 * (@sanzeeb3)
 * [6 years, 8 months ago](https://wordpress.org/support/topic/multisite-config-constants/#post-11996593)
 * Hi Albert,
 * With the constants defined, what is the error message you’re getting while trying
   to send the test email? The constants seem to be okay if you have defined their
   values correctly. Could you please share the exact codes you’ve added? This might
   give us a better idea on what might be going on.
 * Thanks!
 *  Thread Starter [Albert Bretado](https://wordpress.org/support/users/abretado1985/)
 * (@abretado1985)
 * [6 years, 8 months ago](https://wordpress.org/support/topic/multisite-config-constants/#post-11999514)
 * The defined codes are posted on my initial post above.
    Here is the message I
   get when I do an email test:
 * There was a problem while sending the test email.
 * An issue was detected.
 * This means your test email was unable to be sent.
 * Typically this error is returned for one of the following reasons:
 * – Plugin settings are incorrect (wrong SMTP settings, invalid Mailer configuration,
   etc).
    – Your web server is blocking the connection. – Your host is rejecting
   the connection. Recommended next steps:
 *  Triple check the plugin settings, consider reconfiguring to make sure everything
   is correct (eg bad copy and paste).
    Contact your web hosting provider and ask
   them to verify your server can make outside connections. Additionally, ask them
   if a firewall or security policy may be preventing the connection – many shared
   hosts block certain ports. Note: this is the most common cause of this issue.
   Try using a different mailer.
 *  [Ethan Choi](https://wordpress.org/support/users/ethanchoi/)
 * (@ethanchoi)
 * [6 years, 8 months ago](https://wordpress.org/support/topic/multisite-config-constants/#post-12013345)
 * Hi [@abretado1985](https://wordpress.org/support/users/abretado1985/),
 * From your initial post, it appears that the following section is not configured.
 *     ```
       define( ‘WPMS_SMTP_HOST’, ‘xx.xx.xxx.xx’ ); // The SMTP mail host.
       define( ‘WPMS_SMTP_PORT’, 25 ); // The SMTP server port number.
       define( ‘WPMS_SSL’, ” ); // Possible values ”, ‘ssl’, ‘tls’ – note TLS is not STARTTLS.
       define( ‘WPMS_SMTP_AUTH’, false ); // True turns it on, false turns it off.
       define( ‘WPMS_SMTP_USER’, ” ); // SMTP authentication username, only used if WPMS_SMTP_AUTH is true.
       define( ‘WPMS_SMTP_PASS’, ” ); // SMTP authentication password, only used if WPMS_SMTP_AUTH is true.
       define( ‘WPMS_SMTP_AUTOTLS’, false ); // True turns it on, false turns it off.
       ```
   
 * When you get the chance, could you check if you have the above section of the
   constants configured in your site file? If it has not been configure, you’ll 
   need to update the values with your SMTP information.
 * Thanks!
 *  Thread Starter [Albert Bretado](https://wordpress.org/support/users/abretado1985/)
 * (@abretado1985)
 * [6 years, 8 months ago](https://wordpress.org/support/topic/multisite-config-constants/#post-12013683)
 * I’ve added the missing constants but our SMTP does not require a username or 
   password. These constants have always been the same but just recently started
   having issues. I find it odd that if I activate the plugin on the individual 
   site it works but as soon as I add the constants it does not work.
 *  [Sanjeev Aryal](https://wordpress.org/support/users/sanzeeb3/)
 * (@sanzeeb3)
 * [6 years, 8 months ago](https://wordpress.org/support/topic/multisite-config-constants/#post-12026829)
 * Hi [@abretado1985](https://wordpress.org/support/users/abretado1985/),
 * Thanks for the details! Please copy the contents of the error debug message, 
   identified with an orange left border after sending the test emails with constants
   on. Here’s a [screenshot](http://cloud.supportally.com/36b78efa98bf) of an option
   to get full error log. Could you please share the exact SMTP Host, port, and 
   encryption you’re using that does not require a username and password.
 * This might give us a better idea of what might be going on!
 * Thanks!
 *  Thread Starter [Albert Bretado](https://wordpress.org/support/users/abretado1985/)
 * (@abretado1985)
 * [6 years, 8 months ago](https://wordpress.org/support/topic/multisite-config-constants/#post-12029285)
 * Update: Once we updated our PHP to version 7.2 it started working properly.
 *  [Sanjeev Aryal](https://wordpress.org/support/users/sanzeeb3/)
 * (@sanzeeb3)
 * [6 years, 8 months ago](https://wordpress.org/support/topic/multisite-config-constants/#post-12030144)
 * Hi [@abretado1985](https://wordpress.org/support/users/abretado1985/) – Glad 
   to know you sorted it out and thanks for taking the time to let us know.
 * Have a good one! 🙂

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘Multisite Config Constants’ is closed to new replies.

 * ![](https://ps.w.org/wp-mail-smtp/assets/icon-256x256.png?rev=1755440)
 * [WP Mail SMTP by WPForms - The Most Popular SMTP and Email Log Plugin](https://wordpress.org/plugins/wp-mail-smtp/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-mail-smtp/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-mail-smtp/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-mail-smtp/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-mail-smtp/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-mail-smtp/reviews/)

## Tags

 * [constants](https://wordpress.org/support/topic-tag/constants/)
 * [multisite](https://wordpress.org/support/topic-tag/multisite/)

 * 7 replies
 * 3 participants
 * Last reply from: [Sanjeev Aryal](https://wordpress.org/support/users/sanzeeb3/)
 * Last activity: [6 years, 8 months ago](https://wordpress.org/support/topic/multisite-config-constants/#post-12030144)
 * Status: resolved