Skip to main content
This article provides step-by-step instructions to configure email settings in SendGrid.

Introduction

SendGrid is a cloud-based SMTP provider that allows you to send email without maintaining email servers. SendGrid manages all technical details, from scaling the infrastructure to ISP outreach and reputation monitoring to whitelist services and real-time analytics.
Ensure that you have admin access to your SendGrid account.

Configure SendGrid Account

You can sign up for SendGrid and select your pricing plan.

Add Domains in SendGrid

To send emails from your domain using SendGrid, you need to set up domain authentication. This involves generating DNS records for your domain and dedicated IPs, adding these records to your DNS servers, and then validating them in SendGrid. For more information, refer to the following articles:

Create API Keys in SendGrid

Create API keys with full access. For more information, refer to the API Keys
Make sure to note the API key in a secure location. You cannot view it again after creation.

Configure SendGrid Settings in MoEngage UI

  1. Log in to your MoEngage dashboard.
  2. Navigate to Settings > Under Channels > Email > Sender Configuration tab> Click Add Sender sendgrid 1.png
  3. In the following Add Sender screen, add the following SMTP details as shown below: Screenshot 2024-07-12 at 11.30.47 AM.png
    All of the following details are case-sensitive.
    FieldDescription
    Sender NameEnter a sender name.
    SMTP Host NameEnter smtp.sendgrid.net
    SMTP PortEnter 587. Port 587 is recommended to avoid rate limits set by some companies.
    SMTP ProtocolSelect TLS.
    SMTP PasswordEnter the password. This is the API key created above.
    WebApi KeyEnter the key. This is the API key created above.
  4. Configure Unsubscribe Settings based on your requirements. For more information, refer to Track Email Unsubscribes.
  5. Configure the List unsubscribe email settings based on your requirements. For more information, refer to List Unsubscribe Email.
  6. Click Save. The added connector is listed under the Sender configuration tab.
  7. Navigate to the General Settings tab.
  8. From the Set a default sender drop-down, select the sender you added.
  9. From the User Attribute that stores the user’s email address drop-down, select Email (Standard).
  10. In the “From” email address(s) field, add the from address. The domain (the part after @) must be a validated one on SendGrid. Screenshot 2024-07-12 at 1.01.05 PM.png
  11. Save the settings. The “from address” mailbox added above will receive a verification email.
  12. Click the confirmation link to validate the same.
From Address:
Promo - info@, emails@, fashion@, offers@, deals@
Triggered - updates@, news@, alerts@

Configure SendGrid Bounce and Complaint Settings.

  1. Copy the URL in the Bounce & Complaint Tracking from email settings. Screenshot 2024-07-12 at 1.20.13 PM.png
  2. Use the below API to configure event webhook:
    cURL
    curl --location 'https://api.sendgrid.com/v3/user/webhooks/event/settings' \
    --header 'Content-Type: application/json' \
    --header 'Authorization: Bearer API_KEY_GENERATE_ABOVE' \
    --data '{
         "url": "Bounce and Complaint tracking URL from Step 1",
         "enabled": true,
         "group_resubscribe": true,
         "delivered": true,
         "group_unsubscribe": true,
         "spam_report": true,
         "bounce": true,
         "deferred": true,
         "unsubscribe": true,
         "processed": false,
         "open": true,
         "click": true,
         "dropped": true,
         "friendly\_name": "MOE App name"
    }'
    
    To successfully configure the event webhook, make sure to add the following inputs to the API:
    1. Enter the API key obtained from the above Create API Keys from SendGrid section by replacing API_KEY_GENERATE_ABOVE in the API.
    2. Paste the URL obtained from step 1 in the above API, by replacing "Bounce and Complaint tracking URL from Step 1"
    3. Enter your dashboard name, by replacing "MOE App name" in the above API.

Test Email Settings

For more information, refer to Test the Email Settings.

Next Steps

After your SendGrid sender is configured, you can proceed to create and send your email campaigns in MoEngage. For more information, refer to Create Email Campaign.