> ## Documentation Index
> Fetch the complete documentation index at: https://moengage.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Sendgrid

# Introduction

SendGrid is a cloud-based SMTP provider that allows you to send email without having to maintain email servers. SendGrid manages all of the technical details, from scaling the infrastructure to ISP outreach and reputation monitoring to whitelist services and real time analytics.

<Info>
  * Ensure you have access to your Sendgrid account.
  * Ensure that your Sendgrid account is set up and configured.
</Info>

# Configure Sendgrid account

You can sign up for SendGrid at [https://sendgrid.com/pricing](https://sendgrid.com/pricing) and select your pricing plan. After account creation, you can optionally white-label your domain in your account by clicking on "Set Up + Configure" button.

<img src="https://mintcdn.com/moengage/Bd87UYpsGgaHFmzr/images/partner_25555571507476.png?fit=max&auto=format&n=Bd87UYpsGgaHFmzr&q=85&s=6d7ae734d813c8b173d57cf721c03e29" alt="sendgrid_1.png" width="315" height="257" data-path="images/partner_25555571507476.png" />

Add a new domain and clicking on "Save". Then you can add the SendGrid specified TXT Records in your domain's DNS settings. This will remove "via sendgrid.net" seen by email recipients.

<img src="https://mintcdn.com/moengage/Bd87UYpsGgaHFmzr/images/partner_25555540427028.png?fit=max&auto=format&n=Bd87UYpsGgaHFmzr&q=85&s=9f708337814a10db9314612edd0a5ec4" alt="sendgrid_2.png" width="747" height="488" data-path="images/partner_25555540427028.png" />

# Configure Sendgrid on MoEngage

Configure the Sendgrid SMTP services by going into **Settings** > **Channel** > **Email** > **Sender Configuration** > **Add Sender** > **Sendgrid** in MoEngage Dashboard.

## Configure SMTP settings

You can find the [SendGrid's SMTP connector configurations here](https://sendgrid.com/docs/Integrate/index.html#-SMTP-Relay)

* Provide a **Sender Name.**
* **SMTP Host name, Port** and **Protocol** type can be filled in from the details in the link. To avoid rate limits set by some companies, port 587 is the suggested port.
* **SMTP Username and Password** are your SendGrid account credentials.
* **Web API Key** is the same as the SMTP password. This field is not mandatory.

<img src="https://mintcdn.com/moengage/Bd87UYpsGgaHFmzr/images/partner_28108675297556.png?fit=max&auto=format&n=Bd87UYpsGgaHFmzr&q=85&s=4de401df44e82a834e5b5b4256f87488" alt="Screenshot 2024-07-02 at 8.05.20 PM.png" width="2722" height="1092" data-path="images/partner_28108675297556.png" />

## Configure Unsubscribe Settings and List Unsubscribe Email.

* Choose **Sendgrid Tracking** option under **Unsubscribe Settings.** MoEngage will use unsubscribe information received on the below Callback URL from Sendgrid to track unsubscribes.
* Under **List unsubscribe email**
  * If you select **MoEngage Managed** option, MoEngage will include its own mail-to and https URL in email's headers, in all non-transactional emails.
  * If you select **Self Managed** option, enter the **One-click unsubscribe URL** and **List unsubscribe email,** so that MoEngage will include this in your mail-to and https URL in emails' headers, in all non-transactional emails.

<img src="https://mintcdn.com/moengage/Bd87UYpsGgaHFmzr/images/partner_28109193634708.png?fit=max&auto=format&n=Bd87UYpsGgaHFmzr&q=85&s=b768e0604741f3a794ce7181b237da49" alt="Screenshot 2024-07-02 at 8.31.45 PM.png" width="1206" height="398" data-path="images/partner_28109193634708.png" />

## Configure SendGrid Bounce and Complaint Settings

This information is obtained by setting Event Notifications ON in your **SendGrid Account -> Mail Settings**

<img src="https://mintcdn.com/moengage/Bd87UYpsGgaHFmzr/images/partner_25555540432276.png?fit=max&auto=format&n=Bd87UYpsGgaHFmzr&q=85&s=81d08019356ff6d0a00af383ef303d2b" alt="sendgrid_4.png" width="1405" height="320" data-path="images/partner_25555540432276.png" />

Now, copy the url from **MoEngage Dashboard** > **Settings** > **Email** > **Sender Configuration** > **SendGrid** > **Bounces & Complaint Tracking (Callback URL)** and paste it in HTTP POST URL text box shown above.

<img src="https://mintcdn.com/moengage/Bd87UYpsGgaHFmzr/images/partner_28109148208532.png?fit=max&auto=format&n=Bd87UYpsGgaHFmzr&q=85&s=981e272cc997be997c39707ce237a848" alt="Screenshot 2024-07-02 at 8.33.20 PM.png" width="1184" height="256" data-path="images/partner_28109148208532.png" />

Select the actions checked in the below snapshot to enable tracking of unsubscribes, bounces and complaints.

<img src="https://mintcdn.com/moengage/Bd87UYpsGgaHFmzr/images/partner_25555540439572.png?fit=max&auto=format&n=Bd87UYpsGgaHFmzr&q=85&s=6db95d904f265997d7cefbc4c5fad328" alt="sendgrid_6.png" width="643" height="275" data-path="images/partner_25555540439572.png" />

You are all set up with connector configurations. You can now click on **Save** which will test these settings (including credentials etc.) and save them. You can then select SendGrid as the default connector in **General Settings**.
