SendGridSharp - Yet Another SendGrid API C# Library
var account = SendGridAccount.Create("API_USER", "API_KEY");
or
var account = SendGridAccount.Parse("ApiUser=API_USER;ApiKey=API_KEY");
// Get Blocklist
var blockList = await account.Blocks.GetAsync(new GetBlocksParameter { Limit = 10 });
// Delete all from Bounces
await account.Bounces.DeleteAsync(new DeleteBouncesParameter { DeleteAll = true });
// Send Mail
var sendMail = new SendMailParameter
{
From = "from@example.com",
Text = "text content",
Html = "<p>html content</p>"
};
sendMail.To.Add("to@example.com");
await account.Mail.SendAsync(sendMail);
- SMTP API (X-SMTP API)
- Web API
- Web API v3 (partial)
- Marketing Emails API (future)
- Webhooks (Inbound Parse / Event v3)