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

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!!!
Who is Participating?
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.



have look here though this is not trough OL.

net 1.1

net 2.0

Éric MoreauSenior .Net ConsultantCommented:
have you tried LinkedResource as shown in
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.