简体   繁体   中英

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

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 (ie 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?

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM