Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Untitled Attachment in outllok when using System.web.mail Namespace

Status
Not open for further replies.

RizMan

Programmer
Jun 13, 2003
20
FR
Hello there,
I got following situation here:
I am dynamically creating an *.mht file on my server which then 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
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top