summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbrandonmwest <brawest@gmail.com>2012-07-12 14:36:46 -0700
committerbrandonmwest <brawest@gmail.com>2012-07-12 14:36:46 -0700
commit4ca49c3a04baee99026a1ea9385a3dcc77686a44 (patch)
tree7c5edbacba86ca0dc61e8b38d59be32d9d8f9e8a
parentcf275fca7c7c78364bf5031d0ab7dc01afdd51c4 (diff)
parentbd9e8739bf7ec7ec41c3853d42894bb8b9494ded (diff)
downloadsendgrid-csharp-4ca49c3a04baee99026a1ea9385a3dcc77686a44.zip
sendgrid-csharp-4ca49c3a04baee99026a1ea9385a3dcc77686a44.tar.gz
sendgrid-csharp-4ca49c3a04baee99026a1ea9385a3dcc77686a44.tar.bz2
Merge pull request #5 from bobmclaren/master
AddTo functionality added to the IHeader and Header classes
-rwxr-xr-xSendGrid/SendGridMail/Header.cs5
-rwxr-xr-xSendGrid/SendGridMail/IHeader.cs7
2 files changed, 12 insertions, 0 deletions
diff --git a/SendGrid/SendGridMail/Header.cs b/SendGrid/SendGridMail/Header.cs
index f1328f5..6b92a07 100755
--- a/SendGrid/SendGridMail/Header.cs
+++ b/SendGrid/SendGridMail/Header.cs
@@ -21,6 +21,11 @@ namespace SendGridMail
_settings.AddArray(keys, substitutions);
}
+ public void AddTo(IEnumerable<string> addresses)
+ {
+ _settings.AddArray(new List<string> { "to" }, addresses);
+ }
+
public void AddUniqueIdentifier(IDictionary<string, string> identifiers)
{
foreach (var key in identifiers.Keys)
diff --git a/SendGrid/SendGridMail/IHeader.cs b/SendGrid/SendGridMail/IHeader.cs
index f55eadd..b5b9c3f 100755
--- a/SendGrid/SendGridMail/IHeader.cs
+++ b/SendGrid/SendGridMail/IHeader.cs
@@ -20,6 +20,13 @@ namespace SendGridMail
void AddSubVal(String tag, IEnumerable<String> substitutions);
/// <summary>
+ /// This adds the "to" array to the X-SMTPAPI header so that multiple recipients
+ /// may be addressed in a single email. (but they each get their own email, instead of a single email with multiple TO: addressees)
+ /// </summary>
+ /// <param name="addresses">List of email addresses</param>
+ void AddTo(IEnumerable<string> addresses);
+
+ /// <summary>
/// This adds parameters and values that will be bassed back through SendGrid's
/// Event API if an event notification is triggered by this email.
/// </summary>