Posted by Anuraj on Wednesday, May 1, 2013 Reading time :1 minute
While creating email messages with HTML content, normally the images are displayed with IMG tag, where the SRC attribute pointing to an image, which is hosted in the web server. Most email clients will not display the images, which is downloading from the web. Instead of pointing to web URL, you can embed image in the mail message with the help of LinkedResource and AlternateView classes.
Here is the snippet, which embed an image to the email. The convention to access linked resource is cid:name of the linked resource, which is the value of IMG tag SRC attribute.
Note: This method will increase the size of the email, as the images are embedded.
What do you think? I would like to hear your thoughts, suggestions, and questions in the comments section below.