summaryrefslogtreecommitdiffstats
path: root/SendGrid/Example
diff options
context:
space:
mode:
authorBrandon West <brawest@gmail.com>2014-05-21 17:23:35 -0600
committerBrandon West <brawest@gmail.com>2014-05-21 17:23:35 -0600
commite497caefcf35acf753d35f41c209fa09f6d40e99 (patch)
treeb787e0c3007922cb1291a52b2efc1d6922d8813e /SendGrid/Example
parentc48471c02bc8e9d47e4735fda5e3244636b118ef (diff)
downloadsendgrid-csharp-e497caefcf35acf753d35f41c209fa09f6d40e99.zip
sendgrid-csharp-e497caefcf35acf753d35f41c209fa09f6d40e99.tar.gz
sendgrid-csharp-e497caefcf35acf753d35f41c209fa09f6d40e99.tar.bz2
change namespace from SendGridMail to SendGrid, change SendGrid type to SendGridMessage, update to depend on SendGrid.SmtpApi, remove CC and BCC methods since they are not supported in the web API currently.
Diffstat (limited to 'SendGrid/Example')
-rw-r--r--SendGrid/Example/Example.csproj1
-rw-r--r--SendGrid/Example/Program.cs6
-rw-r--r--SendGrid/Example/WEBAPI.cs34
-rw-r--r--SendGrid/Example/app.config4
-rw-r--r--SendGrid/Example/packages.config7
5 files changed, 24 insertions, 28 deletions
diff --git a/SendGrid/Example/Example.csproj b/SendGrid/Example/Example.csproj
index 14020fc..235df7a 100644
--- a/SendGrid/Example/Example.csproj
+++ b/SendGrid/Example/Example.csproj
@@ -80,7 +80,6 @@
<None Include="app.config">
<SubType>Designer</SubType>
</None>
- <None Include="packages.config" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\SendGridMail\Mail.csproj">
diff --git a/SendGrid/Example/Program.cs b/SendGrid/Example/Program.cs
index 275f6b9..9aaa8ec 100644
--- a/SendGrid/Example/Program.cs
+++ b/SendGrid/Example/Program.cs
@@ -1,7 +1,7 @@
using System;
using System.Net;
using System.Net.Mail;
-using SendGridMail;
+using SendGrid;
namespace Example
{
@@ -11,10 +11,10 @@ namespace Example
private static void Main()
{
// Create the email object first, then add the properties.
- var myMessage = new SendGrid();
+ var myMessage = new SendGridMessage();
myMessage.AddTo("anna@example.com");
myMessage.From = new MailAddress("john@example.com", "John Smith");
- myMessage.Subject = "Testing the SendGrid Library";
+ myMessage.Subject = "Testing the SendGridMessage Library";
myMessage.Text = "Hello World!";
// Create credentials, specifying your user name and password.
diff --git a/SendGrid/Example/WEBAPI.cs b/SendGrid/Example/WEBAPI.cs
index 862a96a..ba6810a 100644
--- a/SendGrid/Example/WEBAPI.cs
+++ b/SendGrid/Example/WEBAPI.cs
@@ -2,7 +2,7 @@
using System.Collections.Generic;
using System.Net;
using System.Net.Mail;
-using SendGridMail;
+using SendGrid;
namespace Example
{
@@ -27,7 +27,7 @@ namespace Example
public void SimpleHTMLEmail()
{
//create a new message object
- var message = new SendGrid();
+ var message = new SendGridMessage();
//set the message recipients
foreach (var recipient in _to)
@@ -57,7 +57,7 @@ namespace Example
public void SimplePlaintextEmail()
{
//create a new message object
- var message = new SendGrid();
+ var message = new SendGridMessage();
//set the message recipients
foreach (var recipient in _to)
@@ -89,7 +89,7 @@ namespace Example
public void EnableGravatarEmail()
{
//create a new message object
- var message = new SendGrid();
+ var message = new SendGridMessage();
//set the message recipients
foreach (var recipient in _to)
@@ -123,7 +123,7 @@ namespace Example
public void EnableOpenTrackingEmail()
{
//create a new message object
- var message = new SendGrid();
+ var message = new SendGridMessage();
//set the message recipients
foreach (var recipient in _to)
@@ -158,7 +158,7 @@ namespace Example
public void EnableClickTrackingEmail()
{
//create a new message object
- var message = new SendGrid();
+ var message = new SendGridMessage();
//set the message recipients
foreach (var recipient in _to)
@@ -191,13 +191,13 @@ namespace Example
/// <summary>
/// The Spam Checker filter, is useful when your web application allows your end users
- /// to create content that is then emailed through your SendGrid account.
+ /// to create content that is then emailed through your SendGridMessage account.
/// http://docs.sendgrid.com/documentation/apps/spam-checker-filter/
/// </summary>
public void EnableSpamCheckEmail()
{
//create a new message object
- var message = new SendGrid();
+ var message = new SendGridMessage();
//set the message recipients
foreach (var recipient in _to)
@@ -233,7 +233,7 @@ namespace Example
public void EnableUnsubscribeEmail()
{
//create a new message object
- var message = new SendGrid();
+ var message = new SendGridMessage();
//set the message recipients
foreach (var recipient in _to)
@@ -272,7 +272,7 @@ namespace Example
public void EnableFooterEmail()
{
//create a new message object
- var message = new SendGrid();
+ var message = new SendGridMessage();
//set the message recipients
foreach (var recipient in _to)
@@ -310,7 +310,7 @@ namespace Example
public void EnableGoogleAnalytics()
{
//create a new message object
- var message = new SendGrid();
+ var message = new SendGridMessage();
//set the message recipients
foreach (var recipient in _to)
@@ -350,7 +350,7 @@ namespace Example
public void EnableTemplateEmail()
{
//create a new message object
- var message = new SendGrid();
+ var message = new SendGridMessage();
//set the message recipients
foreach (var recipient in _to)
@@ -389,7 +389,7 @@ namespace Example
public void EnableBypassListManagementEmail()
{
//create a new message object
- var message = new SendGrid();
+ var message = new SendGridMessage();
//set the message recipients
foreach (var recipient in _to)
@@ -428,7 +428,7 @@ namespace Example
public void AddSubstitutionValues()
{
//create a new message object
- var message = new SendGrid();
+ var message = new SendGridMessage();
//set the message recipients
foreach (var recipient in _to)
@@ -470,7 +470,7 @@ namespace Example
public void AddUniqueIdentifiers()
{
//create a new message object
- var message = new SendGrid();
+ var message = new SendGridMessage();
//set the message recipients
foreach (var recipient in _to)
@@ -505,12 +505,12 @@ namespace Example
/// <summary>
/// This feature tags the message with a specific tracking category, which will have aggregated stats
- /// viewable from your SendGrid account page.
+ /// viewable from your SendGridMessage account page.
/// </summary>
public void SetCategory()
{
//create a new message object
- var message = new SendGrid();
+ var message = new SendGridMessage();
//set the message recipients
foreach (var recipient in _to)
diff --git a/SendGrid/Example/app.config b/SendGrid/Example/app.config
index 6e06702..119ca3a 100644
--- a/SendGrid/Example/app.config
+++ b/SendGrid/Example/app.config
@@ -14,6 +14,10 @@
<assemblyIdentity name="System.Threading.Tasks" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-2.6.6.0" newVersion="2.6.6.0" />
</dependentAssembly>
+ <dependentAssembly>
+ <assemblyIdentity name="System.Net.Http" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-2.2.18.0" newVersion="2.2.18.0" />
+ </dependentAssembly>
</assemblyBinding>
</runtime>
</configuration> \ No newline at end of file
diff --git a/SendGrid/Example/packages.config b/SendGrid/Example/packages.config
deleted file mode 100644
index e6019ad..0000000
--- a/SendGrid/Example/packages.config
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-
-<packages>
- <package id="Microsoft.Bcl" version="1.1.6" targetFramework="net40" />
- <package id="Microsoft.Bcl.Build" version="1.0.13" targetFramework="net40" />
- <package id="Microsoft.Net.Http" version="2.2.18" targetFramework="net40" />
-</packages> \ No newline at end of file