Solved

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

Posted on 2003-11-10
3
1,226 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Problem to Office 1 65
How to force output to ascii 2 58
Consume a webservice via VB in Visual Studio 2015 3 42
SQL Server Serialization error 8 43
A basic question.. “What is the Garbage Collector?” The usual answer given back: “Garbage collector is a background thread run by the CLR for freeing up the memory space used by the objects which are no longer used by the program.” I wondered …
Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
Finding and deleting duplicate (picture) files can be a time consuming task. My wife and I, our three kids and their families all share one dilemma: Managing our pictures. Between desktops, laptops, phones, tablets, and cameras; over the last decade…

737 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