Solved

Untitled Attachment in outlook when using system.web.mail namespace

Posted on 2003-11-10
3
1,207 Views
Last Modified: 2007-12-19
Hello there,
I got following situation here:
I am dynamically creating an *.mht file on my server which send needs to be send to a recipient by e-mail. So I'm creating the e-mail on the server with following code
Dim msg As New System.Web.Mail.MailMessage
Dim smtp As System.Web.Mail.SmtpMail
smtp.SmtpServer = mailsvr
msg.To = "..."
msg.From = "..."
....
msg.Attachments.Add(New System.Web.Mail.MailAttachment(strMhtPath)
msg.Send()

The Message arrives at the recipient. It does have an Attachment, but without name i.e. an "Untitled Attachment". When I open the file I can see the contents of the mht. So it is transmitted correctly. However, I absolutely need to have the file Name to show up. I can't sell it like this to my boss :-)
The filename is included in the mail's header, so that seems a little bit weird to me.
Hope someone can help me out here
0
Comment
Question by:rizzimanni
  • 2
3 Comments
 
LVL 96

Accepted Solution

by:
Bob Learned earned 125 total points
ID: 9723039
I don't know if this will help you, but I have VS.NET 2003, and I ran this with an attachment, and the file name was present in the attachment.
0
 
LVL 96

Expert Comment

by:Bob Learned
ID: 10256723
No comment has been added lately, so it's time to clean up this TA.
I will leave the following recommendation for this question in the Cleanup topic area:

Accept: TheLearnedOne {http:#9723039}

Please leave any comments here within the next seven days.
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

TheLearnedOne
EE Cleanup Volunteer
0

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
DataGridView 2 29
Select datagridview rows by range or numbers 11 23
.NET Error 7 42
Why don't I see this table in EDMX file? 2 20
Summary Displaying images in RichTextBox is a common requirement with limited solutions available. Pasting through clipboard or embedding into RTF content only support static images.  This article describes how to insert Windows control objects int…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
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…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

705 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

12 Experts available now in Live!

Get 1:1 Help Now