I came across this article, and it’s really helpful.
What I found is that, basically, to send HTML emails, you’ll need to setup AlternativeView, that is, to specify alternative view for your message.
Next, is to attach and show the embedded image. To attach an image or any file, just use LinkedResource object, and add it to the AlternativeView object you created earlier. The important thing is to set ContentId property, that is, to uniquely identify each resource you attached. The way to link it is pretty straight forward. For example, you attached an image and you set the ContentId to “MyPicture“. The way to show it is using normal HTML code in the AlternateView like:
<img src="cid:MyPicture" mce_src="cid:MyPicture" />
The rest are just normal logic in sending the email itself.
RSS feed for comments on this post · TrackBack URI
Leave a reply