Need help?

Our experts have had an average response time of 12.49 minutes in November 2021 to fix urgent issues.

We will keep your servers stable, secure, and fast at all times for one fixed price.

How to configure Gmail SMTP WordPress plugin

by | Oct 9, 2021

Configure Gmail SMTP WordPress plugin with ease under the guidance of the Support Engineers at Bobcares. It is time to take the plunge and embrace the SMTP plugin for your outgoing emails. 

Learn how to configure the SMTP Mail plugin and send emails from an email address of your choice. The Support team is here with a well-detailed tutorial to help you out.

What is SMTP Mailer plugin?

WordPress offers several plugins to add new features and extend functionality to the WordPress website. The SMTP Mailer plugin is a popular plugin that allows you to configure a mail server to handle outgoing emails from the website. In other words, it takes over the wp-mail function and instead uses SMPT.

Benefits of using Gmail SMTP WordPress plugin

Our Support Engineers recommend using the SMTP plugin due to these advantages:

  • You will be able to send emails directly through the mail server rather than the webserver. Moreover, this prevents problems with Spoofing and Sender Domain Policy.
  • You will be able to send an email from another email host like Gmail.

Configuring SMTP WordPress plugin

Let’s take a look at how our Support Engineers recently configured the SMTP Mail plugin for one of our customers:

  1. First, open the WordPress dashboard and navigate the Plugins, followed by Add New in the left panel.
  2. Then, locate wp-mail-smtp.
  3. After that, click Install button, followed by Activate.
  4. Once it is installed, go to the Plugins page and Settings under the plugin.
  5. Next, enter the following information:
    • From Email: Enter the from email address
    • Force From Email: Put a checkmark here.
    • From Name: Enter the name that should appear as being sent From.
    • Force From Name: Put a checkmark here if you want to force the From name.
    • Return Path: Put a checkmark here.
  6. Then, select Other SMTP in the Mailer section.
  7. Next, toggle the Authentication button and enter the following information:
    • SMTP Host:
    • Encryption: Use TLS encryption
    • SMTP Port: 587 or 465
    • Username: Enter the DreamHost email address
    • Password: Enter the email address password
  8. Finally, save the changes by clicking Save Settings to send emails from the email mentioned above.

Adding code to hide the password

The above configuration involved adding your password to the WordPress dashboard. Now we will secure the password by adding code to the wp-config.php file.

  1. First, log into the server via SSH or FTP.
  2. Then, open the wp-config.php file to edit it.
  3. After that, scroll down to the end of the file till you come across the following line:
    /* That’s all, stop editing! Happy blogging. */
  4. Add these lines above the line mentioned in the previous step:
    // turn constants on        
    define( 'WPMS_ON', true );
    // general configuration settings
    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_SET_RETURN_PATH', true ); // Sets $phpmailer->Sender if true.
    // specific configuration settings
    define( 'WPMS_SMTP_HOST', '' ); 
    define( 'WPMS_SMTP_PORT', 587 ); 
    define( 'WPMS_SSL', 'tls' ); 
    define( 'WPMS_SMTP_AUTH', true ); 
    define( 'WPMS_SMTP_USER', '[email protected]' );
    define( 'WPMS_SMTP_PASS', '********' );
    define( 'WPMS_SMTP_AUTOTLS', true );
    define( 'WPMS_MAILER', 'smtp' );


  5. Save the changes made to the file.
  6. Check whether your password is visible by checking the plugin page.

Testing Gmail SMTP WordPress plugin

Scroll to the top and select the Email Test tab. Then, click the Send Email button. If the setup is successful, the email will be sent successfully.

[Need a hand with Server Management? Give us a call]


To summarize, we learned how to configure the Gmail SMTP WordPress plugin to send out emails from another email address. The Support Team at Bobcares also demonstrated how to secure our password details in the WordPress dashboard.


Never again lose customers to poor server speed! Let us help you.

Our server experts will monitor & maintain your server 24/7 so that it remains lightning fast and secure.



Submit a Comment

Your email address will not be published. Required fields are marked *