Email Attachment sent from VB.NET not showing correctly in Outlook

Posted on 2007-08-05
Last Modified: 2013-11-05
Hi there.

I am sending two jpg attachments via a html email using the img references i.e <img=test.jpg>
My email code is:

            mailMsg.From = New MailAddress(strFrom)
            mailMsg.Subject = strSubject.Trim()
            mailMsg.Body = strMessage.Trim() & vbCrLf
            mailMsg.Priority = MailPriority.High
            mailMsg.IsBodyHtml = True

            'attach each file attachment
            For Each strfile As String In fileList
                If Not strfile = "" Then
                    Dim MsgAttach As New Attachment(strfile)
                End If

I get the email fine, and the jpg images are attached and they display within the body of the email.


1    When I open the email message I notice the attachments disappear from the header (even though I can see the pictures fine.

2    When I print the email out I get broken links

Does anyone know if this can be solved in VB or if its an Outlook bug??

Many thanks!!!
Question by:DavidGreenfield
    LVL 27

    Accepted Solution

    Hello DavidGreenfield,
    I would say that it is not an Outlook bug, although it is the way Outlook handles emails that causes it.
    And even if it would work in Outlook, it probably would not work on other email clients.
    What probably happens is that when you open the email, Outlook moves your message to a temporary folder, and the attachments to a different subfolder within it.
    hence the pictures appear as broken links,
    Same concerning the printing.

    You can consider placing the jpgs on a server and adding a link to them within your <img> tag.


    LVL 18

    Expert Comment


    have look here though this is not trough OL.

    net 1.1

    net 2.0

    LVL 69

    Expert Comment

    by:Éric Moreau
    have you tried LinkedResource as shown in

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    What Is Threat Intelligence?

    Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

    A while ago, I was working on a Windows Forms application and I needed a special label control with reflection (glass) effect to show some titles in a stylish way. I've always enjoyed working with graphics, but it's never too clever to re-invent …
    1.0 - Introduction Converting Visual Basic 6.0 (VB6) to Visual Basic 2008+ (VB.NET). If ever there was a subject full of murkiness and bad decisions, it is this one!   The first problem seems to be that people considering this task of converting…
    Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
    This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor ( If you're looking for how to monitor bandwidth using netflow or packet s…

    760 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    7 Experts available now in Live!

    Get 1:1 Help Now