Andy Webster

Andy Webster

  • NA
  • 117
  • 0

System.Net.Mail.MailMessage where to put image embedded with IMG tag when using IsBodyHtml property

Oct 2 2012 10:55 AM
Hi

I am using the "System.Net.Mail.MailMessage" in my program and I am using HTML in the body of the message. I have set the IsBodyHtml property to true and everything works as expected, except for a missing embedded image file. Within the HTML I have an image tag:

<img src=ActiveX-Error.jpg alt="ActiveX Error">

I realise that if the HTML was saved as a web page with Filename.htm then I would need to put the ActiveX-Error.jpg file in the same directory/folder as the Filename.htm web page.

What I cannot figure out is where to put the ActiveX-Error.jpg so that .Net can find it when I use the "System.Net.Mail.SmtpClient.Send" method to send the message

Any ideas?

Answers (2)