@@ -28,7 +28,7 @@ PM> Install-Package SendGrid.SmtpApi
2828Add the following namespace to use the library:
2929
3030``` csharp 
31- using  SendGrid .CSharp . HTTP . Client ;
31+ using  SendGrid .SmtpApi ;
3232``` 
3333
3434Once you have the library properly referenced in your project, you can include calls to them in your code.
@@ -38,19 +38,32 @@ For a sample implementation, check the [Example](https://github.com/sendgrid/smt
3838# Quick Start  
3939
4040``` csharp 
41- using  SendGrid .CSharp . HTTP . Client ;
41+ using  SendGrid .SmtpApi ;
4242
43+ var  header  =  new  Header ();
44+ 
45+ var  uniqueArgs  =  new  Dictionary <string ,string > {
46+  { " foo"  , " bar"   },
47+  { " chunky"  , " bacon"  }
48+ };
49+ 
50+ header .AddUniqueArgs (uniqueArgs );
51+ 
52+ var  xmstpapiJson  =  header .JsonString ();
53+ ``` 
54+ 
55+ ``` csharp 
56+ SmtpClient  client  =  new  SmtpClient ();
57+ client .Port  =  587 ;
4358client .Host  =  " smtp.sendgrid.net"  ;
4459client .Timeout  =  10000 ;
4560client .DeliveryMethod  =  SmtpDeliveryMethod .Network ;
4661client .UseDefaultCredentials  =  false ;
47- String  sendgrid_username  =  Environment .GetEnvironmentVariable (" SENDGRID_USERNAME"  , EnvironmentVariableTarget .User );
48- String  sendgrid_password  =  Environment .GetEnvironmentVariable (" SENDGRID_PASSWORD"  , EnvironmentVariableTarget .User );
49- client .Credentials  =  new  System .Net .NetworkCredential (sendgrid_username ,sendgrid_password );
62+ client .Credentials  =  new  System .Net .NetworkCredential (" your_sendgrid_username"  ," your_sendgrid_password"  );
5063
5164MailMessage  mail  =  new  MailMessage ();
52- mail .To .Add (new  MailAddress (" test @example.com"  ));
53- mail .From  =  " test@example .com"  ;
65+ mail .To .Add (new  MailAddress (" user @example.com"  ));
66+ mail .From  =  " you@yourcompany .com"  ;
5467mail .Subject  =  " this is a test email."  ;
5568mail .Body  =  " this is my test email body"  ;
5669
0 commit comments