I'm creating a MailMessage that I'm sending to a SMTP server (via SmtpClient). I've got it to work quite well including the html part (by Adding IsBodyHtml = true to the MailMessage.
I'm currently having quite a few troubles with putting images into the html mail though. I've tried it with an alternateview and also with attachments which somehow didnt work for me.
The last version is now to inlcude the icon from an external source which also does not work and where I'm wondering if that is inherent that it does not work or if I'm doing something wrong there.
The code in the mail (as seen from the smpt server (just the image part):
<img alt="" hspace=0 border=0 align=baseline src="http://MyWebsite.at/Design/favicon.ico">
The command I use to put the image there (I'm replacing a placeholder inside the body):
newMail.Body = newMail.Body.Replace("#MyWebsiteLOGO#", "<img alt=\"\" hspace=0 border=0 align=baseline src=\"http://MyWebsite.at/Design/favicon.ico\">");
Like I said the image part is put into a MailAddress (isBodyHtml = true) and I'm using an SmtpClient to transfer the message.
.icofiles in that way. Use.gifor.jpg. - DavidG