diff options
author | Shawn A. Luce <shawn@saluce.com> | 2014-05-15 10:54:41 -0500 |
---|---|---|
committer | Shawn A. Luce <shawn@saluce.com> | 2014-05-15 10:54:41 -0500 |
commit | 64bf5a7ea806cf8974c239e9faab50020d8e8079 (patch) | |
tree | 4dc95d1c89f14080764aa2c2700308726b992831 /SendGrid/Example/Program.cs | |
parent | 531f4c3029409c99417651c541f1fcedbd6d6516 (diff) | |
download | sendgrid-csharp-64bf5a7ea806cf8974c239e9faab50020d8e8079.zip sendgrid-csharp-64bf5a7ea806cf8974c239e9faab50020d8e8079.tar.gz sendgrid-csharp-64bf5a7ea806cf8974c239e9faab50020d8e8079.tar.bz2 |
Added example of MailBuilder usage
Diffstat (limited to 'SendGrid/Example/Program.cs')
-rw-r--r-- | SendGrid/Example/Program.cs | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/SendGrid/Example/Program.cs b/SendGrid/Example/Program.cs index 7fb0960..9a088ac 100644 --- a/SendGrid/Example/Program.cs +++ b/SendGrid/Example/Program.cs @@ -30,5 +30,16 @@ namespace Example Console.WriteLine("Done!");
Console.ReadLine();
}
+
+ private static SendGrid UseMailBuilder()
+ {
+ // Fluently create the mail builder, add the properties, then build the email object
+ return MailBuilder.Create()
+ .To("anna@example.com")
+ .From("john@example.com", "John Smith")
+ .Subject("Testing the SendGrid Library")
+ .Text("Hello World!")
+ .Build();
+ }
}
}
\ No newline at end of file |