Skip to content
This repository has been archived by the owner on Jan 8, 2021. It is now read-only.

0xdeafcafe/sendgrid-dotnet

Repository files navigation

sendgrid-dotnet

This repo isn't maintained anymore, please use the official SendGrid SDK here!

Little library for using SendGrid's v3 mail API with DotNet Core.

Simple Usage Example

var key = new ApiKeyConnection("SG.api.key");
var client = new SendGridClient(key);
client.MailClient.SendAsync(new Email
{
    Personalizations = new List<Personalization>
    {
        new Personalization
        {
            To = new List<EmailDetail>
            {
                new EmailDetail
                {
                    Email = "customer@yahoooooo.com",
                    Name = "Customer Name"
                }
            }
        }
    },
    From = new EmailDetail
    {
        Email = "no-reply@company.domain",
        Name = "Company Letter"
    },
    Subject = "sup",
    Content = new List<Content>
    {
        new Content
        {
            Type = "text/html",
            Value = "<h1>yo yo! :)</h1>"
        }
    }
}).Wait();

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages