This article explains how to use the WP Mail SMTP plugin to send email from your WordPress site, using your Google email address.
If you do not want to use a Gmail address to send from your WordPress site, view the following article instead.
WP Mail SMTP
- In the WordPress dashboard, click 'Plugins > Add New' in the left pane.
- Search for wp-mail-smtp. It can also be found here.
- Click the Install button, then Activate.
- After it's installed and activated, navigate to the 'Plugins' page in your WordPress dashboard.
- Click the 'Settings' link under the plugin.
- Fill in the following fields:
- From Email - Enter the email you wish to send FROM
- Force From Email - Check this box
- From Name - Enter a name you'd like to appear as being sent FROM
- Force From Name - Check this if you wish to force the FROM name
- Mailer - Choose 'Gmail'
- Return Path - Check this box
- Scroll down to the 'Gmail' section.
- Client ID - This is a string of letter and numbers you will create in your Google account.
- Client Secret - This is a string of letter and numbers you will create in your Google account.
- Authorized redirect URI - You will input this into your Google account.
- Click the Save Settings button.
You must now configure your settings within your Google account.
The plugin mentions that you should add the following lines to your wp-config.php file.
define( 'WPMS_ON', true ); define( 'WPMS_SMTP_PASS', 'your_password' );
Do not add these. Adding these will prevent the plugin from sending.
Allowing GMAIL to send from your mail application
You now must allow Google to send email from your WordPress site. You can do this by logging into your Google account. You have two options.