diff options
author | brandonmwest <brawest@gmail.com> | 2013-01-17 16:05:08 -0700 |
---|---|---|
committer | brandonmwest <brawest@gmail.com> | 2013-01-17 16:05:08 -0700 |
commit | c40daa6d204cf86365920066bf1cf630cfa2c9cf (patch) | |
tree | 22d94fb84b9972eed74e2d0773a310e589bf7597 | |
parent | 15d8d7f43f157484e70dd6566b62c958801af41a (diff) | |
download | sendgrid-csharp-c40daa6d204cf86365920066bf1cf630cfa2c9cf.zip sendgrid-csharp-c40daa6d204cf86365920066bf1cf630cfa2c9cf.tar.gz sendgrid-csharp-c40daa6d204cf86365920066bf1cf630cfa2c9cf.tar.bz2 |
Update README.md
-rwxr-xr-x | README.md | 42 |
1 files changed, 1 insertions, 41 deletions
@@ -4,47 +4,7 @@ To use SendGrid in your C# project, you can either <a href="https://github.com/s PM> Install-Package SendGrid ``` -Once you have the SendGrid libraries properly referenced in your project, you can include calls to them in your code. This first example shows the basic structure of the code required to call the SendGrid libraries and send email, as can be found in the program.cs file in the examples directory: - -```csharp -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 - { - // this code is used for the SMTPAPI examples - static void Main(string[] args) - { - var username = "sgrid_username"; - var password = "sgrid_password"; - var from = "bar@domain.com"; - var to = new List<String> - { - "foo@domain.com", - "raz@domain.com" - }; - - //initialize the SMTPAPI example class - var smtpapi = new SMTPAPI(username, password, from, to); - var restapi = new WEBAPI(username, password, from, to); - - //use this section to test out our Web and SMTP examples! - smtpapi.SimpleHTMLEmail(); - - Console.WriteLine("Done!"); - Console.ReadLine(); - } - } -} -``` +Once you have the SendGrid libraries properly referenced in your project, you can include calls to them in your code. This first example shows the basic structure of the code required to call the SendGrid libraries and send email. For a sample implementation, check the Examples folder of this repository. In order to send a simple HTML email using the SendGrid SMTP API, use this code sample: |