summaryrefslogtreecommitdiffstats
path: root/SendGrid/SendGridMail/SendGrid.cs
diff options
context:
space:
mode:
Diffstat (limited to 'SendGrid/SendGridMail/SendGrid.cs')
-rw-r--r--SendGrid/SendGridMail/SendGrid.cs10
1 files changed, 10 insertions, 0 deletions
diff --git a/SendGrid/SendGridMail/SendGrid.cs b/SendGrid/SendGridMail/SendGrid.cs
index 1533a46..9d43dc2 100644
--- a/SendGrid/SendGridMail/SendGrid.cs
+++ b/SendGrid/SendGridMail/SendGrid.cs
@@ -245,6 +245,16 @@ namespace SendGrid
StreamedAttachments[name] = ms;
}
+ public void EmbedStreamImage(Stream stream, String name)
+ {
+ var ms = new MemoryStream();
+ stream.CopyTo(ms);
+ ms.Seek(0, SeekOrigin.Begin);
+ StreamedAttachments[name] = ms;
+
+ _contentImages[name] = name;
+ }
+
public void AddAttachment(String filePath)
{
_attachments.Add(filePath);