summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xSendGrid/Example/Program.cs15
-rwxr-xr-xSendGrid/SendGridMail/WebFileUpload.cs7
2 files changed, 9 insertions, 13 deletions
diff --git a/SendGrid/Example/Program.cs b/SendGrid/Example/Program.cs
index 6230d06..87c44a4 100755
--- a/SendGrid/Example/Program.cs
+++ b/SendGrid/Example/Program.cs
@@ -11,28 +11,31 @@ namespace Example
{
class Program
{
- /*static void Main(String[] args)
+ static void Main(String[] args)
{
- var restInstance = REST.GetInstance(new NetworkCredential("cjbuchmann", "gadget15"));
+ var restInstance = REST.GetInstance(new NetworkCredential("sgrid_username", "sgrid_password"));
//create a new message object
var message = SendGrid.GenerateInstance();
message.AddTo("cj.buchmann@sendgrid.com");
+ message.AddTo("tyler.bischel@sendgrid.com");
+ message.AddTo("kyle.partridge@sendgrid.com");
message.From = new MailAddress("cj.buchmann@sendgrid.com");
message.Html = "<div>hello world</div>";
message.Subject = "Hello World SUbject";
message.AddAttachment(@"C:\Users\Public\Pictures\Sample Pictures\Koala.jpg");
- message.AddAttachment(@"C:\Users\Public\Pictures\Sample Pictures\Penguins.jpg");
+ message.AddAttachment(@"C:\Users\Public\Pictures\Sample Pictures\Jellyfish.jpg");
restInstance.Deliver(message);
Console.WriteLine("Message Sent");
Console.WriteLine("DONE!");
- }*/
+ Console.ReadLine();
+ }
// this code is used for the SMTPAPI examples
- static void Main(string[] args)
+ /*static void Main(string[] args)
{
var username = "cjbuchmann";
var password = "gadget15";
@@ -71,6 +74,6 @@ namespace Example
smtpapi.EnableClickTrackingEmail();
Console.ReadLine();
- }
+ }*/
}
}
diff --git a/SendGrid/SendGridMail/WebFileUpload.cs b/SendGrid/SendGridMail/WebFileUpload.cs
index c7b5165..b6e0faf 100755
--- a/SendGrid/SendGridMail/WebFileUpload.cs
+++ b/SendGrid/SendGridMail/WebFileUpload.cs
@@ -49,13 +49,6 @@ namespace SendGridMail
MultipartEntity multipartEntity = new MultipartEntity();
postMethod.Entity = multipartEntity;
- multipartEntity.AddBody(new StringBody(Encoding.UTF8, "api_user", "cjbuchmann"));
- multipartEntity.AddBody(new StringBody(Encoding.UTF8, "api_key", "gadget15"));
- multipartEntity.AddBody(new StringBody(Encoding.UTF8, "to", "cj.buchmann@sendgrid.com"));
- multipartEntity.AddBody(new StringBody(Encoding.UTF8, "from", "cj.buchmann@sendgrid.com"));
- multipartEntity.AddBody(new StringBody(Encoding.UTF8, "subject", "Hello World HttpClient Test"));
- multipartEntity.AddBody(new StringBody(Encoding.UTF8, "text", "here is some awesome text"));
-
FileInfo fileInfo = new FileInfo(@"D:\att_proj\2.JPG");