Send Grid
Description
SendGrid is a transactional email provider suited for production usage (delivery, tracking, analytics). Your application code depends on IFlexEmailProvider.
Configuration in DI
Register only the provider.
services.AddFlexSendGridEmailProvider(configuration);appsettings.json
Configuration is read from FlexBase:Providers:Email:SendGrid.
{
"FlexBase": {
"Providers": {
"Email": {
"SendGrid": {
"ApiKey": "<store-in-secrets>",
"DefaultFromEmail": "[email protected]",
"DefaultFromName": "Company",
"EnableTracking": true,
"EnableClickTracking": true,
"EnableOpenTracking": true,
"MaxRetries": 3,
"Timeout": "00:00:30"
}
}
}
}
}Examples (template-based)
This mirrors the generated PostBus handler shape (you do not register the handler manually).
Provider considerations
ApiKeymust be stored in secrets.Tracking flags affect analytics and privacy expectations.
Last updated