summaryrefslogtreecommitdiffstats
path: root/SendGrid/Example/Program.cs
diff options
context:
space:
mode:
Diffstat (limited to 'SendGrid/Example/Program.cs')
-rw-r--r--SendGrid/Example/Program.cs7
1 files changed, 6 insertions, 1 deletions
diff --git a/SendGrid/Example/Program.cs b/SendGrid/Example/Program.cs
index fa97707..113e3f5 100644
--- a/SendGrid/Example/Program.cs
+++ b/SendGrid/Example/Program.cs
@@ -1,4 +1,5 @@
using System;
+using System.Collections.Generic;
using System.Net;
using System.Net.Mail;
using SendGrid;
@@ -15,7 +16,11 @@ namespace Example
myMessage.AddTo("anna@example.com");
myMessage.From = new MailAddress("john@example.com", "John Smith");
myMessage.Subject = "Testing the SendGrid Library";
- myMessage.Text = "Hello World!";
+ myMessage.Text = "Hello World! %tag%";
+
+ var subs = new List<String> { "私は%type%ラーメンが大好き" };
+ myMessage.AddSubstitution("%tag%",subs);
+ myMessage.AddSection("%type%", "とんこつ");
SendAsync(myMessage);