# How to Connect SendGrid

In other to get started with this, you need to first create a free account plan with SendGrid and verify your account by following their instructions, you can get started by clicking [here](https://signup.sendgrid.com/).

Then, log in to your account and follow these 3 steps to complete the SMTP connection:

1. Add and authenticate your domain name
2. Verify your DNS records
3. Create, copy and integrate SendGrid's API

**Add and authenticate your domain name**

To get started on authentication, in SendGrid’s left menu go to **Settings > Sender Authentication** or [follow this link](https://app.sendgrid.com/settings/sender_auth).

![](https://2430774507-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MMvULxRbZfmag_jD1k_%2F-MNzOztPwJUAtjKZl6Ey%2F-MO0_-QN2K5WOU2XqGmo%2FGet-Started-button-for-Sender-Authentication.jpg?alt=media\&token=687401b3-757e-4962-872a-72622ff8a9dd)

On the first authentication setup page, you’ll need to answer 2 questions:

* **Which Domain Name Server (DNS) host do you use?** Choose your DNS provider from the list or choose Other Host (if yours is not listed).
* **Would you also like to brand the links for this domain?** select **Yes**, so that all links in your Emails would be branded with your own domain.

Then, click **Next** and add your **domain** name.

![](https://2430774507-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MMvULxRbZfmag_jD1k_%2F-MNzOztPwJUAtjKZl6Ey%2F-MO0VvRP_FtXMAZxI3JC%2FAdd%20domain%20for%20authentication.jpg?alt=media\&token=9081e85a-96b3-49ba-a683-cd8c5b79af7a)

Click on **Advanced Settings,** then uncheck **Use automated security,** check **Use custom return path,** then add a subdomain in the **Return Path** field.

![](https://2430774507-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MMvULxRbZfmag_jD1k_%2F-MNzOztPwJUAtjKZl6Ey%2F-MO0ZFul3mik9DgVUgzH%2FSub%20domain%20settings.jpg?alt=media\&token=3da12941-08d5-4e3f-b5ab-3ee93066bde8)

**Verify your DNS records**

Click **Next** to see the 3 DNS text records, we recommend contacting your hosting support for guidance on how to add these 3 records to your hosting and don't worry, the process is quite easy.

![](https://2430774507-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MMvULxRbZfmag_jD1k_%2F-MNzOztPwJUAtjKZl6Ey%2F-MO0aq826zip-GXiD9mD%2FDNS-records-to-add-for-SendGrid.jpg?alt=media\&token=8d8148b0-df88-41e5-996d-f81026993082)

Note that some hosting could take up to 24 hours for new records to take effect, but when it's done, go back to SendGrid and  check the box labeled **I have added these records,** then click **Verify** button. If the verification does not show a success message it means the record is still propagating, just check back later, but if all goes well, then you'll see the success message.

![](https://2430774507-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MMvULxRbZfmag_jD1k_%2F-MNzOztPwJUAtjKZl6Ey%2F-MO0_F5mXSzsbUSPN3pA%2FDNS-records-verified.jpg?alt=media\&token=a141a795-9b67-4087-a579-4533df09738e)

**Create, copy and integrate SendGrid's API**

This is the **last process** which is quite easy because we will connect SendGrid by using the available API and a direct link to this API page is available next to the API's field or just [click here](https://app.sendgrid.com/settings/api_keys) to visit the page. You could either create a new key there in 2 clicks or just copy the existing key you see.

![A Gif image showing how to connect SendGrid API to YaySMTP](https://2430774507-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MMvULxRbZfmag_jD1k_%2F-MNzOztPwJUAtjKZl6Ey%2F-MO0ggp1J_W7OvhR1scS%2FHow%20to%20create%20API%20for%20SendGrid.gif?alt=media\&token=0fdda0b1-095b-47b4-aefc-fa28ee2dede0)

**Note:**&#x20;

The SendGrid mailer will not be able to work on your site until you’ve completed these three processes involved in the settings.
