<rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>[How Do I:] Embed an Image in an Email with ASP.NET</title><link>http://www.asp.net</link><pubDate>Fri, 16 Sep 2011 13:06:08 GMT</pubDate><generator>umbraco</generator><description>Comments for [How Do I:] Embed an Image in an Email with ASP.NET</description><language>en</language><atom:link href="http://www.asp.net/rss/comments/33515" rel="self" type="application/rss+xml" /><item><title>Comment Posted by sumitmundada</title><link>http://www.asp.net/web-forms/videos/how-do-i/how-do-i-embed-an-image-in-an-email-with-aspnet</link><pubDate>Fri, 07 Nov 2008 05:58:18 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-000000006154</guid><description><![CDATA[ <p>This is awesome post for inline images attached to mails</p>]]></description><enclosure length="0" type="image/png" url="http://i3.asp.net/avatar/sumitmundada.jpg?forceidenticon=false&amp;dt=635050505400000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by agoyal</title><link>http://www.asp.net/web-forms/videos/how-do-i/how-do-i-embed-an-image-in-an-email-with-aspnet</link><pubDate>Sat, 08 Nov 2008 13:06:09 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-000000006155</guid><description><![CDATA[ <p>This a good video has option of embeded video</p>]]></description><enclosure length="0" type="image/png" url="http://i3.asp.net/avatar/agoyal.jpg?forceidenticon=false&amp;dt=635050505400000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by uniquesaiful</title><link>http://www.asp.net/web-forms/videos/how-do-i/how-do-i-embed-an-image-in-an-email-with-aspnet</link><pubDate>Mon, 10 Nov 2008 02:38:34 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-000000006156</guid><description><![CDATA[ <p>A good topic is discussed in this video</p>]]></description><enclosure length="0" type="image/png" url="http://i3.asp.net/avatar/uniquesaiful.jpg?forceidenticon=false&amp;dt=635050505400000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by acroitoriu</title><link>http://www.asp.net/web-forms/videos/how-do-i/how-do-i-embed-an-image-in-an-email-with-aspnet</link><pubDate>Thu, 13 Nov 2008 02:40:46 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-000000006158</guid><description><![CDATA[ <p>nice and useful video... thanks!</p>]]></description><enclosure length="0" type="image/png" url="http://i3.asp.net/avatar/acroitoriu.jpg?forceidenticon=false&amp;dt=635050505400000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by ramy ramadan</title><link>http://www.asp.net/web-forms/videos/how-do-i/how-do-i-embed-an-image-in-an-email-with-aspnet</link><pubDate>Sat, 06 Dec 2008 07:00:24 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-000000006159</guid><description><![CDATA[ <p>Thanks Chris Pels</p>]]></description><enclosure length="0" type="image/png" url="http://i1.asp.net/avatar/ramy%20ramadan.jpg?forceidenticon=false&amp;dt=635050505400000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by kathy.yazzie</title><link>http://www.asp.net/web-forms/videos/how-do-i/how-do-i-embed-an-image-in-an-email-with-aspnet</link><pubDate>Wed, 17 Dec 2008 22:49:48 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-000000006160</guid><description><![CDATA[ <p>Thanks this was a big help. One note: &#160;I had to put quotes around the id - src=\&quot;cid:HDIImage\&quot; for this to work properly with outlook.</p>]]></description><enclosure length="0" type="image/png" url="http://i3.asp.net/avatar/kathy.yazzie.jpg?forceidenticon=false&amp;dt=635050505400000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by bohunt</title><link>http://www.asp.net/web-forms/videos/how-do-i/how-do-i-embed-an-image-in-an-email-with-aspnet</link><pubDate>Fri, 13 Feb 2009 17:42:34 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-000000006161</guid><description><![CDATA[ <p>Very useful - thanks!</p>]]></description><enclosure length="0" type="image/png" url="http://i3.asp.net/avatar/bohunt.jpg?forceidenticon=false&amp;dt=635050505400000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by JustinStolle</title><link>http://www.asp.net/web-forms/videos/how-do-i/how-do-i-embed-an-image-in-an-email-with-aspnet</link><pubDate>Tue, 05 May 2009 22:52:11 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-000000006162</guid><description><![CDATA[ <p>You have an error in your sample code. Make sure your image tag is written using &quot;img&quot; instead of &quot;image&quot;.  If you don&#39;t do that, the attachment will not embed and show up as an ATT0000000.dat file.</p>]]></description><enclosure length="0" type="image/png" url="http://i1.asp.net/avatar/JustinStolle.jpg?forceidenticon=false&amp;dt=635050505400000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by uwspstar</title><link>http://www.asp.net/web-forms/videos/how-do-i/how-do-i-embed-an-image-in-an-email-with-aspnet</link><pubDate>Tue, 26 May 2009 19:24:00 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-000000006163</guid><description><![CDATA[ <p>Nice video , Great job</p>]]></description><enclosure length="0" type="image/png" url="http://i3.asp.net/avatar/uwspstar.jpg?forceidenticon=false&amp;dt=635050505400000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by gretchen</title><link>http://www.asp.net/web-forms/videos/how-do-i/how-do-i-embed-an-image-in-an-email-with-aspnet</link><pubDate>Mon, 15 Jun 2009 03:11:59 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-000000006164</guid><description><![CDATA[ <p>There is a serious error - the embedded image works fine, but the alternateviews don&#39;t work at all!</p><p></p><p>Pels uses an input form for the body of the email so when he switches outlook to plain text he also gets nothing more than the html version - it fooled me because he inputed &quot;this is a text version&quot;, but the email actually said at the top &quot;the message was converted to plain text&quot; and he had the ATTxxx as an attachment. He is NOT getting his text alternateview! (That is, if he hard coded &quot;this is text&quot; in the text view and &quot;this is html&quot; in the html view, he would NEVER see &quot;this is text&quot; no matter what the Outlook setting was)</p><p></p><p>Now my question is: is this unique to outlook 2003 and it is impossible for it to pick up the text alternateview?</p><p></p><p>How do you program alternateviews to work correctly???</p><p></p><p></p>]]></description><enclosure length="0" type="image/png" url="http://i1.asp.net/avatar/gretchen.jpg?forceidenticon=false&amp;dt=635050505400000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by mc9000</title><link>http://www.asp.net/web-forms/videos/how-do-i/how-do-i-embed-an-image-in-an-email-with-aspnet</link><pubDate>Sat, 01 Aug 2009 02:09:55 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-000000006165</guid><description><![CDATA[ <p>This video is showing the method CreateAlternateViewFromString, but it does not show up as a method in VS2008.</p><p>Is this not for DotNet 3.5 ?</p><p>system.net.Mail.AlternateView.CreateAlternateViewFromString &lt;-- does not exist as a method in intellisense or at all</p>]]></description><enclosure length="0" type="image/png" url="http://i2.asp.net/avatar/mc9000.jpg?forceidenticon=false&amp;dt=635050505400000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by sunandash</title><link>http://www.asp.net/web-forms/videos/how-do-i/how-do-i-embed-an-image-in-an-email-with-aspnet</link><pubDate>Mon, 26 Oct 2009 22:57:51 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-000000006166</guid><description><![CDATA[ <p>Hey Thanks a lot for the video. I have exactly the same code which i am using to send some mails through a windows app. But i have two images to embed where the second image has to change everytime.</p><p></p><p>I use two instances of the kind linkedresource in this case and later use concatenate function to get both of them. -</p><p></p><p>Dim collection As LinkedResourceCollection = htmlView.LinkedResources() </p><p>collection.Insert(0, background)</p><p>collection.Insert(1, EmpImage)</p><p>htmlView.LinkedResources.Concat(collection)</p><p></p><p>where background and EmpImage are LinkedResource instances.</p><p></p><p>Not sure if this is the right way I get an exception saying-</p><p>&quot;System.Runtime.InteropServices.ExternalException: A generic error occured in GDI+ at System.Drawing&quot;</p><p>Please Help.</p><p> </p><p></p><p></p><p></p>]]></description><enclosure length="0" type="image/png" url="http://i3.asp.net/avatar/sunandash.jpg?forceidenticon=false&amp;dt=635050505400000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by Pankaj Rai</title><link>http://www.asp.net/web-forms/videos/how-do-i/how-do-i-embed-an-image-in-an-email-with-aspnet</link><pubDate>Tue, 15 Dec 2009 10:34:33 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-000000006167</guid><description><![CDATA[ <p>Nice code which really help some body.</p><p></p><p>Thanks</p>]]></description><enclosure length="0" type="image/png" url="http://i1.asp.net/avatar/Pankaj%20Rai.jpg?forceidenticon=false&amp;dt=635050505400000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by gomzy.net</title><link>http://www.asp.net/web-forms/videos/how-do-i/how-do-i-embed-an-image-in-an-email-with-aspnet</link><pubDate>Mon, 08 Feb 2010 12:53:09 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-000000006168</guid><description><![CDATA[ <p>i did this:</p><p>Dim htmlView As System.Net.Mail.AlternateView = System.Net.Mail.AlternateView.CreateAlternateViewFromString(txtBody.Text.Trim() + &quot;&lt;img src=cid:HDIImage&gt;&quot;, Nothing, &quot;text/html&quot;)</p><p></p><p>            Dim imageResource As New System.Net.Mail.LinkedResource(FileUpload1.PostedFile.FileName)</p><p></p><p>and i am getting an error telling:</p><p></p><p>&quot;could not find the file&quot;</p><p></p><p>how to solve this?</p>]]></description><enclosure length="0" type="image/png" url="http://i1.asp.net/avatar/gomzy.net.jpg?forceidenticon=false&amp;dt=635050505400000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by udayasankar</title><link>http://www.asp.net/web-forms/videos/how-do-i/how-do-i-embed-an-image-in-an-email-with-aspnet</link><pubDate>Wed, 07 Apr 2010 13:04:05 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-000000006169</guid><description><![CDATA[ <p>How to add images in between the mail body. i would like to send newsletter mail for all my users. any videos tutorials regarding this method please post the link here.   </p>]]></description><enclosure length="0" type="image/png" url="http://i1.asp.net/avatar/udayasankar.jpg?forceidenticon=false&amp;dt=635050505400000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by brokunn</title><link>http://www.asp.net/web-forms/videos/how-do-i/how-do-i-embed-an-image-in-an-email-with-aspnet</link><pubDate>Fri, 16 Sep 2011 13:06:08 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-0000000014207</guid><description><![CDATA[ <p>As several others have noted above, this example is broken.  Here&#39;s one I found that was much more helpful:</p><p></p><p><a rel="nofollow" href="http://www.codeproject.com/KB/aspnet/EmbedImage.aspx" target="_blank">www.codeproject.com/</a></p><p></p>]]></description><enclosure length="0" type="image/png" url="http://i1.asp.net/avatar/brokunn.jpg?forceidenticon=false&amp;dt=635050505400000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item></channel></rss>