Documentation > Integrating e-mail providers

Gmail / Google Apps

If you want to use your existing Gmail or Google Apps account to send out emails, you can do so using the SMTP integration.

Gmail settings

  1. You’ll require to generate an App password with Google
  2. Activate 2-Step Verification process
  3. Visit the App passwords page
  4. Follow the steps here to set it up and save the password you generate

Integrating Gmail with CleverTap

  1. In the dashboard, navigate to Settings and click on Integrate Email
  2. Select SMTPS
  3. In the Host text box, fill in smtp.gmail.com
  4. In the Port text box, fill in 465
  5. Username and Password values should your email address and the App password that you generated
  6. From Address – this value is used as the sender email address
  7. Save your settings
  8. Finally, click Send a test email

Understanding bounces

When an email is rejected by a recipient’s email server, it’s called a bounce. There are two kinds of bounces –

  • Soft Bounces : Soft bounces typically indicate a temporary delivery issue to an address. Some reasons for a soft bounce could be that the recipient’s mailbox is full, or the Mail Server is down. Soft bounces are included in the campaign reports; the users are not marked as unsubscribed.
  • Hard Bounces : A hard bounce indicates a permanent reason an email cannot be delivered. Hard bounces are included in the campaign reports; the users are marked as unsubscribed.

Processing bounces

To process bounced email messages, you’ll need to make an HTTP request to the callback URL specified in Dashboard → Settings → Connectors tab → Email section. The request should be of type HTTP POST with the payload in the following format:

// if you're not sure of the time of the bounce, just set it to the current epoch

[
    {
        "event": "softbounce",
        "data": [
            {
                "e": "email1@emailprovider.com",  // email id that soft bounced
                "ts": 1435322805                  // time of the bounce
            },
            {
                "e": "email2@emailprovider2.com", // email id that soft bounced
                "ts": 1435322805                  // time of the bounce
            }
        ]
    },
    {
        "event": "hardbounce",
        "data": [
            {
                "e": "email3@emailprovider.com",   // email id that hard bounced
                "ts": 1435322805
            }
        ]
    }
]
copy Copied

Handling unsubscriptions

To handle unsubscription requests from users, you can follow the steps mentioned here – Handling unsubscriptions