Inline embed images in emails (MIME) and strip out attached images.
Package EMLTransformer | Platforms .NET 4.6, .NET Standard 2.0
var embedder = new MailInlineImageEmbedder();
embedder.InlineEmbedImagesAndStripFromAttachments("email.eml", "out.eml");
If images are attached as application/octet-stream, the MailInlineImageEmbedder
can be passed an implementation of IMimeTypeSniffer
.
var embedder = new MailInlineImageEmbedder(new FileExtensionBasedMimeTypeSniffer());
var streamOut = embedder.InlineEmbedImagesAndStripFromAttachments(streamIn);