Gmail SMTP server for sending emails in WordPress
WordPress enables the easy uploading of content over the internet and also manage the contents effectively. The user can send emails from the WordPress website and in case there is an issue in sending emails from the site use Gmail SMTP server for email sending. This article will provide the necessary steps related to that.
WordPress uses PHP mail function for sending email notifications and it might happen that this function is not working due to various reasons. To prevent spam most WordPress hosting companies restrict its usage. SMTP in the industry standard for sending emails.
There are mainly 2 ways to do it.
- First one is ‘OAuth Authentication’ which is the most secure method to send emails using the Gmail servers.
- Second is by using Gmail to be used by less secure apps. This method is not a secured one as the user need to type the Gmail password that will be visible to admin users.
Steps to setup Gmail SMTP using OAuth Protocol –
- Firstly install the Gmail SMTP plugin for WordPress.
- Now go to ‘Settings’ and then ‘Gmail SMTP’ for the plugin settings configuration.
- The user can now see the requirement of a web application with the Gmail account to generate API keys.
- Check for the link to the web application and the link will take the user to the console website of Google Developers.
- Sign-in with the Gmail account that is to be used for sending WordPress emails.
- A new project will be created with the Gmail API after the login.
- To continue to click on ‘Go to credentials’ button.
- The user will be asked ‘Where will you be calling the API from?’ on the next screen. From the drop-down select ‘Web Browser’.
- Next select ‘User Data’ under ‘What data will you be accessing?’.
- To continue to click on ‘What credentials do I need?’ button.
- Paste the URL shown on Gmail SMTP Plugin’s setting page under ‘Authorized redirect URIs’.
- Click on the option ‘Create client ID’ to continue.
- The user is now in the OAuth setup screen. Select the Gmail address and click ‘Continue’.
- The user has successfully setup the Gmail API. Click on ‘Done’ button now.
- View the list of client IDs created to access the Gmail API and click on the website name to move further.
- View the Client ID and Client Secret Keys on the next screen. Copy the keys and paste it in the Gmail SMTP’s setting page.
- Enter Gmail address in the OAuth email address. Also, select TLS for encryption and use ‘587’ as the port.
Contact WordPress support to know about the steps in details. Support team will provide remote assistance or steps for the setup of Gmail SMTP server to send WordPress emails.