How to Setup Gmail/Google SMTP with WP Mail Bank?
WP Mail Bank is the SMTP plugin used to send emails in WordPress. WP Mail Bank is one of the most versatile and flexible WordPress Plugin that might help you in sending emails directly to your recipient’s inbox.
Are you not receiving Email Notifications from your WordPress site?
When you are not able to receive email notifications from your site then there are two common reasons behind this:
1. Server Configuration.
2. Spam Filtering.
WordPress by default send email using the PHP Mail function, and many WordPress hosting servers are not configured to use PHP mail().
Your email provider keeps a check on all incoming emails to determine, from where the emails are originating.
Example: If your email server is example.com, but your email claims to sent from your web site’s domain, then there are chances to block that notification before it reaches to the spam folder.
How to Fix this?
SMTP is the solution for fixing email delivery issue. It is the standard for sending emails. Unlike PHP mail function, SMTP uses authentication which increases the delivery of the emails.
You need to have a Gmail / G Suite Account for Gmail SMTP Server to send emails. WP Mail Bank is freely available on wordpress.org so you can install it directly from your WordPress dashboard.
The best thing you will find in the WP Mail Bank is just a single click configuration, clear and to the point. There are two different methods through which you can connect with outside SMTP server.
Here is the step-by-step guide on setting up WP Mail Bank WordPress Plugin with G Suite through OAuth and Login Credentials.
Step 1: Basic Information
Scroll to WP Mail Bank Menu and choose Setup Wizard.
Firstly, you need to provide data to From Name and From Email fields which will be used to replace the Sender Name and Sender Email.
If you do not wish to enter information in this fields, then the plugin will use the Default Settings.
Click on Next Step button to proceed to the account setup window.
Step 2: Account Setup
You need to set up your account details to send emails with WP Mail Bank. For this, you have two methods, Login or OAuth Authentication Credentials.
Configuration With Username and Password
You would need to choose the Mailer Type. Go and select Send Email via SMTP from the drop-down list.
Next, you need to set up SMTP options to continue.
Enter your SMTP Host and SMTP Port details, you can get this information from your hosting provider, or you can also visit your configuration options to obtain related information.
Typically SMTP host is mail.yourdomainname.com, like smtp.gmail.com, you have to replace your domain with yourdomainname.com.
Next step is to set the Encryption Type. Two types of encryption are available SSL and TLS. If you are choosing SSL, then the SMTP Port will be 465, and you are choosing TLS then it is 587.
You have to set Authentication Type to Login. Provide correct credentials for Username and Password fields.
After that click on Next Button to proceed.
Configuration With Gmail OAuth API
Choose OAuth ( Client ID and Secret Key required ) option from the Authentication drop-down list, then configure your Client ID, Secret Key from your desired account and paste here. To configure, Click on the link given with Client ID ( Get API Key / How to Setup? ), and you can also visit here.
Now, Create a project to continue the configuration. Click on the Create Button.
Enter the Name of the Project in the Project Name field and click on the Create Button.
To enable the API services on your account, you have to click on ENABLE APIS AND SERVICES.
Click on Gmail API to continue to next step. A new screen opens and then click on the Enable button.
Click on the Create Credentials Button displays on the top of your screen.
Click Client ID link, under the heading, Find out What kind of credentials you need.
Click on the Configure Consent Screen button which continues you to OAuth Consent Screen.
In the OAuth Consent Screen tab, you have to provide Application Name and Authorized Domain Name. Click on the Save Button.
In the Credentials tab, click the Create Credentials button.
Select OAuth client ID from the drop-down list.
In the Create OAuth Client ID screen, select the Web Application radio button under the Application Type. And enter a Name in the Name setting field, as Web Client 1 shown below.
Copy the Redirect URI and paste it on Authorized Redirect URIs settings, click on Create button to continue.
A popup window will show with the Client ID and Client Secret key.
These are the settings that you need to copy and paste back into the WP Mail Bank settings. Click on the Save Settings button to continue.
Now you have to grant permission to Google to allow WP Mail Bank to access it.
Click the link Grant permission with Google at the top of the page. Click on the Allow button.
Note: Before you start configuring, make sure that your less secure apps enable to your account.
Step 3: Confirm the Settings
Browse to the Send Test Email menu and provide your Email Address on which you want to send a test email. Then click on the Send Test Email button.
Your debug output is display on the screen and you have to check whether the email sent or not.
We hope this article helped you configuring the Gmail/Google SMTP with WP Mail Bank WordPress Plugin. You may also want to see our WP Mail Bank configuration guide with MailGun SMTP, Yahoo SMTP, SendGrid SMTP and, Office 365.