HI, Exabees! Getting WordPress to send emails is actually easy. Easy because WordPress is capable of sending email notifications to its users by default. It's hard because those emails often end up in the SPAM folder. They go to SPAM because they use a less-than-credible SMTP, so any email sent using that SMTP will be considered SPAM. In this tutorial I will tell you how to make wordpress blogs can send emails using gmail and the email is not considered spam.
Setting WP Admin SMTP di Blogmu
- Install the WP Mail SMTP plugin first then activate it
- Go to WP Mail SMTP Settings on the General Tab. In the section
From Email: fill in your gmail address
From Name: filled with the name of the email sender.
The Force Name option can be checked if you wish. - In the Mailer section select Gmail
- The next section, namely Client ID, Client Secret, and Authorized redirect URI will be filled in after we create a Web App on Google. For now, just fill it in first
- Press the Save Settings button
Creating a Web App in Google Developer
In this section you will create a Gmail Web Application and connect it to your blog via Client ID, Client Secret. Okay, now we move on to the next step.
- Log in to Google Console Developer using your email address. If you first enter Google Console Developer, verification from Google will appear as shown below.Just follow the steps requested by Google.
- After entering the Dashboard section, create a new API for your wordpress blog.
- Fill in the project name with WP Mail SMTP. Then click the Create button
- Enable Google API for WP Mail SMTP project
- Select Gmail API
- Create credentials. These credentials are the Client ID, Client Secret that you will enter into your wordpress blog later.
- Fill in the question form from Google as follows
Which API do you use: fill in Gmail API
Where will you call this API from: Web Browser content (Javascript)
What data will you access: select User Data
Click the button What credentials do I need? - A pop up will appear to create an OAth Consent Screen. This is a kind of pop up screen that will appear on the API user's screen about who will access their data and give consent for the access.
Click PREPARE APPROVAL SCREEN - The contents of this section are as follows
Authorized domain: fill in your domain name for example example.com
Application Homepage link: fill in your domain name. For example http://example.com
Application Privacy link: fill in your domain name. For example http://example.com
Application Terms of Service link: fill in your domain name. For example http://example.com
Click the Save button, and you will be taken to the next screen
10. Copy the Authorized redirect URI on your wordpress blog to the authorized redirect URI in Google Developer ConsoleThen, press Enter.
11. After you press Enter, a Refresh button will appear at the bottom. Just click that button
12. Then click the Creat OAuth Client ID button
13. Now, you have finished creating a Gmail Web App to send emails from your wordpress blog. But don't download the credentials. Click the button as shown below
14. Now we have a Client ID and Client secret that can be entered into your wordpress blog. To get the Client ID and Client secret click the pencil icon. Or if you are confused, just click the Credential menu on the left side of Google Console Developer and you will get a screen display like below
15. You will get the Client ID and Client Secret as shown below.
16. Enter the Client ID and Client Secret above into WP Mail SMTP on your wordpress website.
Be careful not to copy any spaces. It must be completely without spaces!Click Save Setting.
17. Now it's time to allow wordpress web to use your gmail account to send notification emails. Click the Allow plugin to send emails using your Google account button.
18. Google verification login will appear as belowClick the yes button.
19. Google will send a verification number to your phone, tap the number on your phone that matches the number that appears on your computer screen. You are only given a few seconds to do that, so it's best, when verifying, your cellphone is no longer lowbat or dead ?Just follow all the instructions displayed by Google.
20. Now, let's assume that step 19 was successful. Now it's time to try sending an email from your wordpress blog.
21. From Dashboard > WP Mail SMTP > Settings. Select the Test Email tab
The Send to section is filled with the destination email address. Then click the Send button
22. Check the email as entered in Sent to, if there is an email from your blog it means you have succeeded