Skip to content

thara0402/sendgrid

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SendGridSharp

SendGridSharp - Yet Another SendGrid API C# Library

Create Account

var account = SendGridAccount.Create("API_USER", "API_KEY");

or

var account = SendGridAccount.Parse("ApiUser=API_USER;ApiKey=API_KEY");

API Requests

// 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);

Support APIs

  • SMTP API (X-SMTP API)
  • Web API
  • Web API v3 (partial)
  • Marketing Emails API (future)
  • Webhooks (Inbound Parse / Event v3)

About

Yet Another SendGrid API C# Library

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C# 100.0%