diff options
author | Shawn A. Luce <shawn@saluce.com> | 2014-05-15 16:59:50 -0500 |
---|---|---|
committer | Shawn A. Luce <shawn@saluce.com> | 2014-05-15 16:59:50 -0500 |
commit | f6a3e659081c641b45f94978fd59df5244d5c4d3 (patch) | |
tree | 763d16295c96a1259a8e8a2d8144a963ee81a221 /SendGrid/SendGridMail/SendGrid.cs | |
parent | 64bf5a7ea806cf8974c239e9faab50020d8e8079 (diff) | |
download | sendgrid-csharp-f6a3e659081c641b45f94978fd59df5244d5c4d3.zip sendgrid-csharp-f6a3e659081c641b45f94978fd59df5244d5c4d3.tar.gz sendgrid-csharp-f6a3e659081c641b45f94978fd59df5244d5c4d3.tar.bz2 |
Added support for inline images and minor name changes in the MailBuilder
Diffstat (limited to 'SendGrid/SendGridMail/SendGrid.cs')
-rw-r--r-- | SendGrid/SendGridMail/SendGrid.cs | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/SendGrid/SendGridMail/SendGrid.cs b/SendGrid/SendGridMail/SendGrid.cs index cc87ffd..54aaa96 100644 --- a/SendGrid/SendGridMail/SendGrid.cs +++ b/SendGrid/SendGridMail/SendGrid.cs @@ -163,13 +163,14 @@ namespace SendGridMail public IHeader Header { get; set; }
public String Html { get; set; }
public String Text { get; set; }
-
+
#endregion
#region Methods for setting data
private List<String> _attachments = new List<String>();
private Dictionary<String, MemoryStream> _streamedAttachments = new Dictionary<string, MemoryStream>();
+ private Dictionary<String, String> _contentImages = new Dictionary<string, string>();
public void AddTo(String address)
{
@@ -251,6 +252,14 @@ namespace SendGridMail set { _attachments = value.ToList(); }
}
+ public void EmbedImage(String filename, String cid) {
+ _contentImages[filename] = cid;
+ }
+
+ public IDictionary<string, string> GetEmbeddedImages() {
+ return new Dictionary<string, string>(_contentImages);
+ }
+
public void AddSubstitution(String replacementTag, List<String> substitutionValues)
{
//let the system complain if they do something bad, since the function returns null
|