Acquire

Settings

  • Home link-arrow
  • Settings link-arrow
  • Set Up a Gmail SMTP

Set Up a Gmail SMTP


Gmail is one of the most popular email services in the world. Set up a secure SMTP with Google and Acquire. 

In this article:

  • Creating a Google Project 
  • Creating OAuth 2.0 API Credentials
  • Generating OAuth 2.0 Playground Tokens
  • Adding Gmail Credentials to Acquire 
  • Verifying the SMTP Configuration 

What you'll need:

  • A Google Developer account. If you do not have an account, please create one first before proceeding with this guide.
  • Your app’s domain information: domain, home page link, privacy policy link, and terms of service link

Creating a Google Project

To generate a Gmail SMTP, you’ll need an API key. To generate a key, log in to your Google Developer Console account. From the Dashboard, select your project. (In the example below, acquire-bot was selected). 

Then, select ‘New Project’.

XDcJIebhpAxxcf1NTfr-dfovy8mWW12D1a9DaPkTHBAtu-pDHZwq05cWCSu__qDBnWEfBEBq6ncYPb8Iti9a8zFFUr5aOdDv_0xu4V6uutL3DXLMKUaR__SA4fmhXw

Enter the project name, where you would like to save it, and then press ‘Create’.


92QfLF8tgIdPP0xzSArikxa4uCPxuH27uqtMp_JobSzBR5_MSDfxnLJGPf8Qog8Zgt_59ei6BxrykdRXTrhl-tOgL_Go9MkUdbKWfJ8QxAcDfx4TYlv7iRNkGQTJKA

 

Creating OAuth 2.0 API Credentials

OAuth credentials will be needed to generate a client id. A client id helps Google's OAuth servers identify our app so that we can securely send emails from Nodemailer.

 

Press the triple lines (‘≡’) next to Google Cloud Platform to open the sidebar. Then select APIs & Services > Credentials. 


TIUdtwoxz29et21KoGlPJs3OeXXdAYk4HKXlfpYCCDyTjeEQ3i4xCujBclXJJMDZSAMSG8RiJiUq7SqaMCH_9knS19HzbZHZA8a6asmJv0caHKUGnHOk3Chzj6EmLA

 

Before proceeding, you may need to configure the consent screen. The consent screen configuration is important when an application offers Google Sign In. 

 

Click on ‘Configure Consent Screen’.


bKjftDxB29kj5GX1WZ31r3zISlWdrCB4DsKbeN2T5xO_rzM0qfjVkCheMlONTmAS2WSfsBi-Sc-rq69btPCP4k14GXcHP8wzlkDojbt3AoLcevr5VF_IjPGRn3pQPg

 

Select ‘External’ for the User Type and then click on ‘Create’.


kWdN_-WyEBH1grqKRfHGwmo_ZYC-bQUfuVPSncpxUIXO3WFPtsVO_QQ9jGaG0gVj_VLY-1XG1veZf-iVe77r-SNDg9IhPXb_uBI8h02-05-JyeZnOwDcaTEQ-xbDAg

 

You will be directed to the App Registration page. You’ll be asked to provide the required information:

  • The app's name 
  • Your email address
  • The developer's email address (which can be your email address)

Optionally, you may input the following information:

  • Your app logo (if applicable)
  • Your app name
  • The data you are requesting, or scopes, which you will add in the next step
  • Links to your app's privacy policy and terms of service
  • Scopes 
  • Test users 
flO6qr-07t0wgACQPfAHJmiCMyLWUvNL7pW5GHzrsrHMb7MBOZXEX-nduiond8WmRhJHiOlI7d_7Vy86obzn1xhq8sD1pA0Bnp_HyqZY0lXdn7cuwgV7EyyfY13doA

 

Input all required information.

Once you've completed the consent screen, go to the 'APIs and Services' > 'Credentials' section. Click on 'Create Credentials'. Then select 'OAuth client ID'.

Copy the client ID and client secret shown on the screen and save it for later.


oauth-client-key-and-secret-579c1bced83ff0ac5b33d252.png
credentials-project-screen-oauth2-0clientIds-project-d4808ea5322d2ab18ac687c8.png

In the Authorized redirect URIs section, paste "https://developers.google.com/oauthplayground" in the URIs input field. Then, hit 'Save'

Generating OAuth 2.0 Playground Tokens

A refresh token and access token may now be generated from the client id and secret.

Start by visiting Google Developers OAuth 2.0 Playground.

Once on the page, click the gear icon and check the ‘Use your own OAuth credentials’ box. Then paste the client id and secret.


5v_6PaV5bGuZDZNh2PrfJtS2FjRF9v8bCluSqd9-sAf8LOeJdyhF6W_qD9Q--CrwkhG_rYCayFc05wy4w5i6zNRBw79fwilsiX4TwP8IPDXKo1ypRvCg7NdKLvH48Q

 

On the next screen, click ‘Allow’ so that Google OAuth 2.0 Playground has access to your Google account.

fa8g4lxgoflpTxCu4gydYQaR77Rd__5NzV9qx0F5XlyT9LOXODZE7WWFjimq2zIYWiTQqDADvGAb5GE3Ra9KHHd4cTU7Te8tWQkpaBdKrtOnGNPI_1HLWmjvimYwpA

Select https://mail.google.com from the API list, then press ‘Authorize APIs’.



CHhSdXPJXjNQHsyHT9lctPJbWL5WBZJn9Qm_Ut32Km_VZyu8-b22BUeiFfn6JoQAdlKCw7uA_c2TsWTXCLLTagmKMB4RmhQM2yeQuxBNUSYEjRe2YX4ro_UeJTaH77ok6lT-gFQ

On the next screen, press 'Allow' to authorize the API. After being redirected back to the OAuth 2.0 Playground, go to the left panel, and click the ‘Exchange authorization code for tokens’ button.

Once the refresh and access token is generated, copy the refresh token and save it for later.


vgCQ_lqT-F83bPPbJ1VsyL5XXsVfFbmC7nDihlasSD9jxesG35mPd4bj6B3cMal30GpHnzwZUvZ268MCl-qm14vInqidyr_vxJfrPX3RkTq-T94f8cqv2KpRtVOmYKnlVPyU-wA

 

Add Gmail Credentials in Acquire app

Log in to the Aquire Platform, click on the Settings > Email-Setup > SMTP tab.

LZZJX-0NssmWALMn8gfhPOqwR4mW9gQJfG2c6iSsgqo6193Ab9i-eYVLysNVMa32WmvK55Ecz2PF3IYdLqVLk2CWRzolKhSJZ7vj8cuYhpq9HHHgDOpcVtkZ3BbWQb8yx304PI4

Next, click on the ‘Create SMTP’.

oVlsA04SVA39zPscJ_uXuPk9CYy6_-27m4iHkiP29_Ipiq55HWJ6ihy5eCbw3hYo0mRFJj2EXUmJIQxrIZJQYUV8YXNJ9Xt51b2LgGFIgqTlCnx5wgKSk_ZGKx3yBMRjrqytcB4

Enter the SMTP name and select theService Type as ‘Gmail’ from the drop-down.

1ACtwawdZTPercBtphPJInRs-ddABtzVDClSGw7IT4TcQKwea7RjSlljO2Kipy6ayeONmOZQWECxeEDlK0BRzR46QVzQmogxndVE64Ub6kBbF6QghVGAAHGvwLVF57eOg6rl2bU

Next, enter the following information into the newly generated fields:

  1. Enter your Gmail Client ID, Client Secret, Client Email Address, and Refresh Token in the respective fields.
  2. Finally, click on the ‘Save’ button.

Izb68nKFnOAE2s50MHZD2gVPztgXG22oXqjG8boUA2SubUxS0LS_2rLCOu8xpCdUu3sq6cx1O7JVYJd3tBPTWwiG3vrMdr1-sPsFVi3QESs_QiKHJlQIv-VHnPqu9GudEF1E788


Verifying the SMTP Configuration

Acquire gives you the option to test your SMTP setup immediately after configuration. Verify if emails are dispatched from the server by sending a test email to yourself. To test your SMTP, go to Settings > Email Setup and select the SMTP tab.

First, click on the three dots (‘...’) beneath the ‘Action’ heading. Select ‘Send Test Email’ from the drop-down menu.

Jm1AREhJMdwyIMsKtHzrAaeQuuTZ5oo0LC535SEXCd0umDK0IVAK8R5GUOncrYn9IiaN1cVBi0Fdrt4IrZfvTz0-hjTf-cibgkhANAM61ASCHhkCpsChcx0qsFL-AAnm5-s3i9E

 

 

Enter your email address as the recipient in the SMTP Email field.

eM08opBjvGxxcrcQiEM9-66sT2UodiGUAkI8HEJP3vd6kgwbsN-WwJ4gAZL7F7Bwj8hDrvBNX-FVBMVbbqoSfMkvyM9UypQ3E0VMDHHHorj0m2d8GWRp2pUJUX3MzgsW6H7lLyg

Finally, click ‘Send Email’.

You will be notified once the test email is successfully sent. An email should also appear in the specified inbox.

Having trouble? Reach out to support@acquire.io or check out the Google Developer Guide.

 

 


Related Articles