Send Image in Email using Append C# RRS feed

  • Question

  • User564995064 posted

    Hi all!

    I have an application in which I need to email a confirmation page to the applicant.  I would like the logo to be at the top of the email.  Currently it is in my images folder in Visual Studio 2010.  I have tried several different ways to get the image embedded but nothing will work.  I would appreciate any assistance you can give.

    StringBuilder mailBody1 = new StringBuilder();
    mailBody1.Append("<p>image here</p>");
    mailBody1.Append("<p>Your application has been successfully submitted.</p>");
    mailBody1.Append("<p>&nbsp;&nbsp;&nbsp;&nbsp; Confirmation Number: 123456"</p>");
    Thursday, April 26, 2018 6:52 PM

All replies

  • User475983607 posted

    Just use the image URL.

    mailBody1.Append("<p><img src='http://www.mysite.com/images/theImage.jpg' /></p>");

    Thursday, April 26, 2018 7:20 PM