LiteX.Email.SendGrid is a email message library which is based on LiteX.Email.Core and SendGrid.
Allow sending emails via SendGrid.
This client library enables working with the SendGrid API to sending email messages.
Small library to abstract sending email messages to SendGrid API. Quick setup for SendGrid API and very simple wrapper for the SendGrid API to email messages.
Very simple configuration in advanced ways. Purpose of this package is to bring a new level of ease to the developers who deal with SendGrid API integration with their system.
Install via Nuget.
PM> Install-Package LiteX.Email.SendGrid
{
//LiteX SendGrid settings
"SendGridConfig": {
"SendGridApiKey": "--- REPLACE WITH YOUR SendGridApiKey ---",
"EnableLogging": true
}
}
public class Startup
{
public void ConfigureServices(IServiceCollection services)
{
// 1. Use default configuration from appsettings.json's 'SendGridConfig'
services.AddLiteXSendGridEmail();
//OR
// 2. Load configuration settings using options.
services.AddLiteXSendGridEmail(option =>
{
option.SendGridApiKey = "";
option.EnableLogging = true;
});
//OR
// 3. Load configuration settings on your own.
// (e.g. appsettings, database, hardcoded)
var sendGridConfig = new SendGridConfig()
{
SendGridApiKey = "",
EnableLogging = true
};
services.AddLiteXSendGridEmail(sendGridConfig);
// add logging (optional)
services.AddLiteXLogging();
}
}
Same for all providers.
For more helpful information about LiteX Email, Please click here.