[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

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

Posted on 2007-08-05
3
Medium Priority
?
855 Views
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)
                    mailMsg.Attachments.Add(MsgAttach)
                End If
            Next

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

However,

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!!!
0
Comment
Question by:DavidGreenfield
3 Comments
 
LVL 27

Accepted Solution

by:
Dabas earned 1500 total points
ID: 19636385
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.

Regards,

Dabas
0
 
LVL 18

Expert Comment

by:vbturbo
ID: 19636746
Hi

have look here though this is not trough OL.

net 1.1
http://www.systemwebmail.com/

net 2.0
http://www.systemnetmail.com/

vbturbo
0
 
LVL 70

Expert Comment

by:Éric Moreau
ID: 19642256
have you tried LinkedResource as shown in http://www.codeproject.com/useritems/Sending_Mail.asp
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Microsoft Reports are based on a report definition, which is an XML file that describes data and layout for the report, with a different extension. You can create a client-side report definition language (*.rdlc) file with Visual Studio, and build g…
Parsing a CSV file is a task that we are confronted with regularly, and although there are a vast number of means to do this, as a newbie, the field can be confusing and the tools can seem complex. A simple solution to parsing a customized CSV fi…
Integration Management Part 2
Screencast - Getting to Know the Pipeline
Suggested Courses

829 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