summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xSendGrid/SendGridMail/Header.cs6
-rwxr-xr-xSendGrid/SendGridMail/IHeader.cs7
2 files changed, 13 insertions, 0 deletions
diff --git a/SendGrid/SendGridMail/Header.cs b/SendGrid/SendGridMail/Header.cs
index f1328f5..127b05a 100755
--- a/SendGrid/SendGridMail/Header.cs
+++ b/SendGrid/SendGridMail/Header.cs
@@ -21,6 +21,12 @@ namespace SendGridMail
_settings.AddArray(keys, substitutions);
}
+
+ public void AddTo(IEnumerable<string> recipients)
+ {
+ _settings.AddArray(new List<string> { "to" }, recipients);
+ }
+
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..4045385 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="recipients">List of email addresses</param>
+ void AddTo(IEnumerable<string> recipients);
+
+ /// <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>