Title: smtp code wp-config
Last modified: November 21, 2019

---

# smtp code wp-config

 *  Resolved [Alwin](https://wordpress.org/support/users/wp-opti/)
 * (@wp-opti)
 * [6 years, 8 months ago](https://wordpress.org/support/topic/smtp-code-wp-config/)
 * I want to hide my SMTP password by adding this code to my wp-config file:
 * define( ‘WPMS_ON’, true );
    define( ‘WPMS_SMTP_PASS’, ‘mypassword’ );
 * I always thought that code like this should be added above the line:
    /* That’s
   all, stop editing! Happy publishing. */
 * However, in the WP Mail SMTP settings page I see this:
    “To do this add the lines
   below to your wp-config.php file:”
 * I assume you mean directly above the line
    /* That’s all, stop editing! Happy
   publishing. */
 * and not completely at the bottom of the wp-config file,
    correct?

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

 *  [Sanjeev Aryal](https://wordpress.org/support/users/sanzeeb3/)
 * (@sanzeeb3)
 * [6 years, 8 months ago](https://wordpress.org/support/topic/smtp-code-wp-config/#post-12176339)
 * Hi [@wp-opti](https://wordpress.org/support/users/wp-opti/),
 * Yes, the constants should be added above that line. By ‘add the lines below’,
   we mean the constants written below that phrase. I apologize for any confusion
   about this.
 * Thanks!
 *  Thread Starter [Alwin](https://wordpress.org/support/users/wp-opti/)
 * (@wp-opti)
 * [6 years, 8 months ago](https://wordpress.org/support/topic/smtp-code-wp-config/#post-12176428)
 * Thank you. The strange thing is however that when I had the code placed above
   that line, WP Mail SMTP was still sending emails.
 * How is that possible?

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

The topic ‘smtp code wp-config’ 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

 * [wp-config](https://wordpress.org/support/topic-tag/wp-config/)

 * 2 replies
 * 2 participants
 * Last reply from: [Alwin](https://wordpress.org/support/users/wp-opti/)
 * Last activity: [6 years, 8 months ago](https://wordpress.org/support/topic/smtp-code-wp-config/#post-12176428)
 * Status: resolved