summaryrefslogtreecommitdiffstats
path: root/SendGrid/SendGridMail/Transport/Web.cs
diff options
context:
space:
mode:
authorBrandon West <brawest@gmail.com>2014-05-21 16:28:35 -0600
committerBrandon West <brawest@gmail.com>2014-05-21 16:28:35 -0600
commit20c3fb41794d39286965f515ab93c4d445380050 (patch)
treeef86a0ea4246219ec900929a87b242436c814306 /SendGrid/SendGridMail/Transport/Web.cs
parent2dcfcb14adced98a2ff56adcd8c8767c96c3572a (diff)
parent3cf289409ab39918f7e40487f3d2696f67ca6031 (diff)
downloadsendgrid-csharp-20c3fb41794d39286965f515ab93c4d445380050.zip
sendgrid-csharp-20c3fb41794d39286965f515ab93c4d445380050.tar.gz
sendgrid-csharp-20c3fb41794d39286965f515ab93c4d445380050.tar.bz2
Merge pull request #60 from saluce65/master
Add Support for Inline Images
Diffstat (limited to 'SendGrid/SendGridMail/Transport/Web.cs')
-rw-r--r--SendGrid/SendGridMail/Transport/Web.cs4
1 files changed, 4 insertions, 0 deletions
diff --git a/SendGrid/SendGridMail/Transport/Web.cs b/SendGrid/SendGridMail/Transport/Web.cs
index f053575..a26e9e0 100644
--- a/SendGrid/SendGridMail/Transport/Web.cs
+++ b/SendGrid/SendGridMail/Transport/Web.cs
@@ -210,6 +210,10 @@ namespace SendGridMail
result = result.Concat(message.Cc.ToList().Select(a => new KeyValuePair<String, String>("cc[]", a.Address)))
.ToList();
}
+ if (message.GetEmbeddedImages().Count > 0) {
+ result = result.Concat(message.GetEmbeddedImages().ToList().Select(x => new KeyValuePair<String, String>(string.Format("content[{0}]", x.Key), x.Value)))
+ .ToList();
+ }
return result.Where(r => !String.IsNullOrEmpty(r.Value)).ToList();
}