summaryrefslogtreecommitdiffstats
path: root/SendGrid/SendGridMail
diff options
context:
space:
mode:
Diffstat (limited to 'SendGrid/SendGridMail')
-rwxr-xr-xSendGrid/SendGridMail/Header.cs8
-rwxr-xr-xSendGrid/SendGridMail/IHeader.cs5
-rwxr-xr-xSendGrid/SendGridMail/SendGrid.cs1
3 files changed, 13 insertions, 1 deletions
diff --git a/SendGrid/SendGridMail/Header.cs b/SendGrid/SendGridMail/Header.cs
index 6b92a07..be4ebeb 100755
--- a/SendGrid/SendGridMail/Header.cs
+++ b/SendGrid/SendGridMail/Header.cs
@@ -15,6 +15,14 @@ namespace SendGridMail
_settings = new HeaderSettingsNode();
}
+ public IEnumerable<string> To
+ {
+ get
+ {
+ return _settings.GetArray("to");
+ }
+ }
+
public void AddSubVal(string tag, IEnumerable<string> substitutions)
{
var keys = new List<String> {"sub", tag};
diff --git a/SendGrid/SendGridMail/IHeader.cs b/SendGrid/SendGridMail/IHeader.cs
index b5b9c3f..3ec7911 100755
--- a/SendGrid/SendGridMail/IHeader.cs
+++ b/SendGrid/SendGridMail/IHeader.cs
@@ -11,6 +11,11 @@ namespace SendGridMail
/// </summary>
public interface IHeader
{
+ /// <summary>
+ /// Gets the array of recipient addresses from the X-SMTPAPI header
+ /// </summary>
+ IEnumerable<string> To { get; }
+
/// <summary>
/// This adds a substitution value to be used during the mail merge. Substitutions
/// will happen in order added, so calls to this should match calls to addTo in the mail message.
diff --git a/SendGrid/SendGridMail/SendGrid.cs b/SendGrid/SendGridMail/SendGrid.cs
index 42214b7..14b9a9a 100755
--- a/SendGrid/SendGridMail/SendGrid.cs
+++ b/SendGrid/SendGridMail/SendGrid.cs
@@ -298,7 +298,6 @@ namespace SendGridMail
Header.SetCategory(category);
}
-
public void AddAttachment(String filePath)
{
_attachments.Add(filePath);