WP Mail Setup

How to Set Up WP Mail SMTP Plugin to Send Emails

If you’re running a WordPress website, you might have faced issues with email delivery. You didn’t receive important notifications, or your contact form submissions went missing. The most common error is ‘Email Delivery Error.’ But, setting up the WP Mail SMTP plugin can help resolve these issues by ensuring your emails are delivered reliably. 

Here’s a simple, step-by-step guide on how to set up the WP Mail SMTP plugin.

What is WP Mail SMTP?

WP Mail SMTP is a WordPress plugin that improves your website’s email delivery system. It reconfigures the wp_mail() PHP function to use proper SMTP  instead of the default mail function, increasing the chances of your emails being delivered successfully.

Step-by-Step Guide to Setting Up WP Mail SMTP

Step 1: Install and Activate the Plugin

  1. Log in to your WordPress Dashboard.
  2. Navigate to “Plugins” > “Add New.”
  3. Search for “WP Mail SMTP.”
  4. Click “Install Now” and “Activate” once the installation is complete.

Step 2: Configure the Plugin

  1. Go to “WP Mail SMTP” in the WordPress dashboard menu.
  2. Click on “Settings.”

Step 3: Set Up the Mailer

  1. From Email:
    • Enter the email address from which your emails will be sent.
    • Tick the box that says “Force From Email” if you want all emails sent from this address.
  2. From Name:
    • Enter the name of the email you will be sending.
    • Tick the box that says “Force From Name” if you want all emails sent with this name.

Step 4: Choose Your Mailer

You’ll have several mailer options. Let’s go through the setup for some popular choices:

Option 1: Gmail

  1. Select “Google / Gmail” as your mailer.
  2. You’ll need to create a Google app to get the required credentials.
    • Click on the “Set Up” link provided in the plugin.
    • Follow the steps to create a project and enable the Gmail API.
    • Set up the OAuth consent screen and create credentials.
    • You’ll get a Client ID and Client Secret.
  3. Paste the Client ID and Client Secret into the respective fields in the WP Mail SMTP settings.
  4. Click “Save Settings.”
  5. Grant permission by clicking “Allow plugin to send emails using your Gmail account.”

Option 2: SMTP (Generic)

  1. Select “Other SMTP” as your mailer.
  2. Fill in the required SMTP settings:
    • SMTP Host: Your SMTP server (e.g., smtp.yourdomain.com).
    • Encryption: Choose between None, SSL, or TLS.
    • SMTP Port: Common ports are 465 for SSL and 587 for TLS.
    • SMTP Authentication: Yes.
    • SMTP Username: Your email address.
    • SMTP Password: Your email password.
  3. Click “Save Settings.”

Step 5: Send a Test Email

  1. Go to the “Email Test” tab in the WP Mail SMTP settings.
  2. Enter an email address to send a test email.
  3. Click “Send Email.”
  4. Check your email inbox to see if the test email has arrived.
Troubleshooting
  • Email Not Delivered: Double-check your SMTP settings. Ensure the username and password are correct.
  • Error Messages: Refer to the WP Mail SMTP documentation or support for specific error codes.

Conclusion

Setting up the WP Mail SMTP plugin is a straightforward process that significantly improves the reliability of email delivery from your WordPress site. Following these simple steps, you can ensure your emails reach their intended recipients without getting lost or marked as spam. The plugin’s documentation and support can provide additional assistance if you encounter any issues.