VB.NET app that sends an email with an image in the signature block

jdana
jdana used Ask the Experts™
on
I've built a little tool that shoots off automatic emails to clients as a reminder that they need to submit materials for an upcoming case.  The tool works just fine, but I'd love to plant the company logo in the signature block.  Is this possible?  I've pasted the code that establishes the body of the email below.  (m_email is an instance of MailMessage.)  

As I see it, embedding an <img> tag in the code below won't do me any good.  The JIT compiler just sees the text below as big old block of text.  

I suppose I could place an <img> tag in the body and drop the source image on our website, but I would expect most email clients today (Outlook, Eudora, Mac OS X Mail...) don't download the images unless the user explicitly asks it to.
m_email.Body = _
                "<!DOCTYPE html PUBLIC ""-//W3C//DTD XHTML 1.0 Transitional//EN"" ""http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"">" & _
                "<html xmlns=""http://www.w3.org/1999/xhtml"" >" & _
                "<body style=""font-family: Arial; line-height: 12pt; font-size: 9pt; color: #494949;"">" & _
                    "Our records show that your case " & m_dr.Item("CaseName") & " (Case Number " & Format(m_dr.Item("CaseID"), "####-####") & _
                    ", " & m_dr.Item("ArbiterList") & ") has a " & m_dr.Item("MaterialDueDate") & " material due date. " & _
                    "blah blah blah..." & _
                    "<br />" & _
                    "<br />" & _
                    "<div style=""font-weight: bold; color: blue"">My Firm.</div>" & _
                    "<div>My Firms's Address</div>" & _
                    "<div>Suite 400</div>" & _
                "</body>" & _
                "</html>"

Open in new window

Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Software Architect in .Net
Commented:
Check this, maybe it will help you:

http://www.systemnetmail.com/faq/4.4.aspx#4.4

Hope that helps.

Commented:
Hi,
   Try this :
   m_email.BodyFormat = MailFormat.Html;
Éric MoreauSenior .Net Consultant
Top Expert 2016
Commented:
see >>Embedding an image into a HTML body << from http://www.emoreau.com/Entries/Articles/2007/09/Using-SystemNetMail.aspx

Author

Commented:
Perfect!  Thanks guys.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial