Integrating with SendGrid
This section outlines the steps required to integrate delivr.to with SendGrid, allowing you to send delivr.to emails using your own infrastructure and domains.
SendGrid Preparation
This guide assumes you already have a SendGrid account, and have purchased a domain that you wish to send delivr.to emails from. We’ll be using Namecheap here to demonstrate the DNS changes, but the steps will be similar across other domain registrars.
Add Sender Authentication
-
Head to Sender Authentication in SendGrid and select
Get Started
under theDomain Authentication
section. -
Select your registrar from the dropdown, and leave the branded links option as
No
. -
Enter the domain you’ve purchased in the
Domain You Send From
box. We’ll be usingdelivr-sandbox.site
. -
Add the provided records to the DNS section of your registrar. NOTE Namecheap automatically appends the hostname, so only add the host’s prefix, as below.
- If successful, you should be able to hit
Verify
and see this confirmation screen.
Generate API Key
-
Navigate to API Keys and click
Create API Key
. -
Give it a name such as
delivr.to SendGrid Integration
and selectRestricted Access
. -
Give the key
Full Access
forMail Send
, andRead Access
forMail Settings
, and clickCreate & View
. -
Make a note of the key displayed as you won’t be able to access it again.
Disable Tracking
- Lastly, visit Tracking Settings and disable all tracking.
Add SendGrid Integration
-
Back in delivr.to, go to Settings and click
Send with SendGrid
. -
Enter a friendly name for this integration to help you recognise it later.
-
Enter the API key from the previous step, and the address you’d like to send the emails from. We added the entire domain to SendGrid in the previous step, so we can use any address from that domain. The
From
andReply to
fields will be populated with this address.
- Hit
Add
and you should be greeted with the message below. delivr.to attempts to validate the supplied key, and will return an error if it can’t successfully authenticate to the API. If this happens, check the API key permissions are set according to the instructions above, and that the correct key has been supplied.