How to Configure Gmail SMTP Settings with WP Mail SMTP in WordPress Print

  • Updated on 13-May-2024
  • wordpress, configure gmail in wordpress, wp mail smtp plugin
  • 17

How to Configure Gmail SMTP Settings with WP Mail SMTP in WordPress

Integrating Gmail with your WordPress site using WP Mail SMTP by WPForms ensures reliable email delivery, avoids spam filters, and leverages the security of OAuth 2.0 authentication. This detailed guide will help you configure Gmail as your SMTP server using OAuth 2.0, eliminating the need to allow less secure apps on your Google account.

Step 1: Installation of WP Mail SMTP Plugin

1. Access Your WordPress Dashboard:
- Log in to the administrative area of your WordPress website.WordPress Login Page
2. Install WP Mail SMTP:
- Go to `Plugins > Add New`.Add New Plugin
- In the search bar, type "WP Mail SMTP by WPForms".wp mail smtp form
- Click `Install Now` on the plugin, and activate it once the installation is complete.Activate

Step 2: Configure WP Mail SMTP to Use Gmail

1. Open WP Mail SMTP Settings:

- Navigate to `WP Mail SMTP` > `Settings` from the WordPress dashboard.wp mail smtp settings

2. Select the Mailer:

- Choose `Google/Gmail` from the mailer options list to set up Gmail as your SMTP service.phpmailer as google

Step 3: Set Up a Project in Google Cloud Console

1. Access Google Cloud Console:
- Visit Google Cloud Console.
2. Start a New Project:
- Click on `Create Project`. Assign a project name and take note of the project ID.
3. Activate Gmail API:
- Proceed to `APIs & Services > Dashboard`.
- Click on `+ ENABLE APIS AND SERVICES`, search for "Gmail API" and enable it.

Step 4: Configure OAuth Consent Screen

1. Setup the Consent Screen:
- Navigate to `APIs & Services > OAuth Consent Screen`**.
- Select the `External` user type and click `Create`.
- Enter the required information, such as the app name, user support email, and developer contact email.
- After filling out the form, proceed by clicking `Save` and continue to set up the scopes and finalize the consent screen settings.

Step 5: Creating OAuth 2.0 Credentials

1. Generate OAuth 2.0 Credentials:
- Go to `APIs & Services > Credentials`.
- Click on `Create Credentials` and choose `OAuth 2.0 Client IDs`.
- Set the application type to `Web application`.
- Add the Authorized redirect URI, which should be formatted like `https://yourdomain.com/wp-admin/options-general.php?page=wp-mail-smtp` (replace "yourdomain.com" with your actual domain).
- Note down the generated Client ID and Client Secret after clicking `Create`.

Step 6: Enter Credentials in WP Mail SMTP

1. Input Your Credentials:
- Return to the WP Mail SMTP settings page in your WordPress admin.
- Under the Gmail configuration section, input the Client ID and Client Secret you received from the Google Cloud Console.
2. Authorize Your Website:
- After saving these settings, click the link to authorize your website to send emails using your Google account.

Step 7: Testing Email Functionality

1. Send a Test Email:
- Navigate to the `Email Test` tab available in the WP Mail SMTP settings menu.
- Enter an email address where you can receive the test email and click `Send Email` to check the configuration.

Step 8: Troubleshooting Tips

- Check Google Cloud Console Settings: Revisit your project to ensure the Gmail API is enabled and that you have correctly set up all OAuth credentials.
- Match Redirect URI: Ensure the redirect URI in the Google console matches the one specified in the plugin settings exactly.

Conclusion:

Setting up Gmail with WP Mail SMTP using OAuth 2.0 not only increases the reliability of your email delivery but also maintains high security by not compromising on sensitive account settings. Follow these detailed steps to effectively utilize Gmail’s robust infrastructure for your WordPress site’s email communications.

Info! Using Gmail with OAuth 2.0 significantly enhances your email system’s security and effectiveness.

For further assistance or if you encounter any issues, please open a support ticket here or use our LiveChat service for immediate help.

This guide aims to provide an in-depth approach to configuring the WP Mail SMTP plugin for Gmail, ensuring a smooth email communication setup for your WordPress site.


Was this answer helpful?

« Back