summaryrefslogtreecommitdiffstats
path: root/SendGrid/SendGridMail/SendGrid.cs
diff options
context:
space:
mode:
Diffstat (limited to 'SendGrid/SendGridMail/SendGrid.cs')
-rwxr-xr-xSendGrid/SendGridMail/SendGrid.cs9
1 files changed, 9 insertions, 0 deletions
diff --git a/SendGrid/SendGridMail/SendGrid.cs b/SendGrid/SendGridMail/SendGrid.cs
index 287c7aa..2e238f5 100755
--- a/SendGrid/SendGridMail/SendGrid.cs
+++ b/SendGrid/SendGridMail/SendGrid.cs
@@ -235,6 +235,7 @@ namespace SendGridMail
}
}
+ public Attachment[] Attachments { get; set; }
private List<Attachment> _attachments = new List<Attachment>();
public Attachment[] Attachments
{
@@ -439,6 +440,14 @@ namespace SendGridMail
}
}
+ if(Attachments != null)
+ {
+ foreach (Attachment attachment in Attachments)
+ {
+ message.Attachments.Add(attachment);
+ }
+ }
+
if (Html != null)
{
AlternateView htmlView = AlternateView.CreateAlternateViewFromString(Html, null, "text/html");