summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrandon West <brawest@gmail.com>2013-01-14 11:15:07 -0700
committerBrandon West <brawest@gmail.com>2013-01-14 11:15:07 -0700
commit2b5c4ab34b6ccbbfbba34e8d1b9f87daed9d06fd (patch)
tree97e5aa641fd6221ea43b600fa9f554820262f1aa
parentdc5e5618f5050df2f10ea5ee30c05ed164e768d1 (diff)
downloadsendgrid-csharp-2b5c4ab34b6ccbbfbba34e8d1b9f87daed9d06fd.zip
sendgrid-csharp-2b5c4ab34b6ccbbfbba34e8d1b9f87daed9d06fd.tar.gz
sendgrid-csharp-2b5c4ab34b6ccbbfbba34e8d1b9f87daed9d06fd.tar.bz2
revert example
-rwxr-xr-xSendGrid/Example/Program.cs14
-rwxr-xr-xSendGrid/Example/WEBAPI.cs16
2 files changed, 7 insertions, 23 deletions
diff --git a/SendGrid/Example/Program.cs b/SendGrid/Example/Program.cs
index 41bbf76..1debf2e 100755
--- a/SendGrid/Example/Program.cs
+++ b/SendGrid/Example/Program.cs
@@ -15,21 +15,21 @@ namespace Example
// this code is used for the SMTPAPI examples
static void Main(string[] args)
{
- var username = "brandonmwest";
- var password = "bray!8282";
- var from = "brawest@gmail.com";
+ var username = "sgrid_username";
+ var password = "sgrid_password";
+ var from = "bar@domain.com";
var to = new List<String>
{
- "brawest@gmail.com"
+ "foo@domain.com",
+ "raz@domain.com"
};
//initialize the SMTPAPI example class
- //var smtpapi = new SMTPAPI(username, password, from, to);
+ 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();
- restapi.SimpleHTMLEmail();
+ smtpapi.SimpleHTMLEmail();
Console.WriteLine("Done!");
Console.ReadLine();
diff --git a/SendGrid/Example/WEBAPI.cs b/SendGrid/Example/WEBAPI.cs
index 6e52064..985005d 100755
--- a/SendGrid/Example/WEBAPI.cs
+++ b/SendGrid/Example/WEBAPI.cs
@@ -5,7 +5,6 @@ using System.Net;
using System.Net.Mail;
using SendGridMail;
using SendGridMail.Transport;
-using System.IO;
namespace Example
{
@@ -47,21 +46,6 @@ namespace Example
//set the message subject
message.Subject = "Hello World HTML Test";
- //add a file from stream
- var file = "bar";
-
- var memoryStream = new MemoryStream();
- var stream = new StreamWriter(memoryStream);
- stream.Write(file);
- stream.Flush();
- memoryStream.Seek(0, SeekOrigin.Begin);
- message.AddAttachment(memoryStream, "foo.txt");
- stream.Flush();
- stream.Close();
-
- //add a file from disk
- message.AddAttachment("test.txt");
-
//create an instance of the Web transport mechanism
var transportInstance = Web.GetInstance(new NetworkCredential(_username, _password));