Does SendGrid email support construct similar to "AlternateViews" in .NET MailMessage?

109 Views Asked by At

Web site I work on (written in .NET) generates a lot of reports in HTML format. Some of them have images with the source ("src" attribute) pointing to a local file (i.e. local to the web site). If a user wants a report to be delivered by email we would convert images into System.Net.Mail.LinkedResource, replace "src" attributes by "src=cid:IdOfResource" and create "AlternateView" on Sytem.Net.Mail.MailMessage.AlternateViews collection. Does SendGrid support such scenario?

1

There are 1 best solutions below

2
On

Yes, you can embed images in your emails that you send with SendGrid with cid resource URLs. You can read about how to do that in this article on how to embed images in your emails.

I don't know how the .NET "AlternateView" fits into this, but you can certainly embed images in your emails.