using System; using System.Collections.Generic; using System.Linq; using System.Net; using System.Net.Mail; using System.Text; using SendGridMail; using SendGridMail.Transport; namespace Example { class Program { static void Main(string[] args) { var username = "cjbuchmann"; var password = "Gadget_15"; var from = "cj.buchmann@sendgrid.com"; var to = new List { "cj.buchmann@sendgrid.com" }; var bcc = new List { "eric@sendgrid.com" }; var cc = new List { "eric@sendgrid.com" }; //initialize the SMTPAPI example class var smtpapi = new SMTPAPI(username, password, from, to); var restpapi = new RESTAPI(username, password, from, to, null, null); //send a simple HTML encoded email. //smtpapi.SimpleHTMLEmail(); //send a simple Plaintext email. //smtpapi.SimplePlaintextEmail(); //send a gravatar enabled email. //smtpapi.EnableGravatarEmail(); //send an open tracking enabled email. //smtpapi.EnableOpenTrackingEmail(); restpapi.SimpleHTMLEmail(); } } }