- DarkLight
Twilio Email
- DarkLight
This article explains the prerequisites to configure if you use the Twilio Sendgrid application to send campaign emails.
Domain Authentication
Log in to the Twilio application and navigate to the Domain Authentication page.
In Twilio Sendgrid, create a Domain Name.
Choose Mail Server.
Create DNS Settings.
Send these DNS Settings to your IT team. The IT team configures these DNS settings in the Mail Server.
After the IT team has added these settings in the Mail Server, navigate to the Sendgrid application.
Verify if the domain gets authenticated by clicking the Verify button.
After the domain is verified, navigate to Sendgrid > Settings.
Create API Keys. See this page.
You can now send campaign emails. To set up the Campaign Manager application, see this page.
Configure Webhook
The Webhook URL for both parent should be configured on the Twilio Sendgrid application. This helps users to receive events relating to campaign emails.
Navigate to the Twilio Sendgrid application’s Mail Settings > Event Webhook.
Type the Webhook. For example,
(https://<IP Address>/LCMEmailOutboundWebHook/api/Outbound/SendGridEventData) - enable this Public IP. LCMEmailOutboundWebhook is used to get events from Sendgrid and redirect the events to the callback URL.
When a campaign email is sent to Sendgrid, the tenant webhook URL is also sent with the email as a custom variable. Configure the LCMEmailEngine application with the following setting in the app.config file:
<add key="OutboundCallBackUrl" value=http://<IPAddress>/LCMEmailWebhookAPI/api/Outbound/>The Sendgrid webhook events are routed to the parent webhook application along with the tenant webhook URL. The parent uses the tenant webhook URL to ensure the events related to each mail are routed to the appropriate tenant.