?
Solved

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

Posted on 2003-11-10
3
Medium Priority
?
1,249 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
2 Comments
 
LVL 96

Accepted Solution

by:
Bob Learned earned 500 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

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Question has a verified solution.

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

The object model of .Net can be overwhelming at times – so overwhelming that quite trivial tasks often take hours of research. In this case, the task at hand was to populate the datagrid from SQL Server database in Visual Studio 2008 Windows applica…
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 …
Are you ready to place your question in front of subject-matter experts for more timely responses? With the release of Priority Question, Premium Members, Team Accounts and Qualified Experts can now identify the emergent level of their issue, signal…
Look below the covers at a subform control , and the form that is inside it. Explore properties and see how easy it is to aggregate, get statistics, and synchronize results for your data. A Microsoft Access subform is used to show relevant calcul…
Suggested Courses

749 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