attachment appears as icon VB.Net/System.Web.Mail

G

Guest

Hello
I'm using the following code to send mail from VB.NET 2003

Imports System.Web.Mail
..
..
Dim oMail as System.Web.Mail.SmtpMail
Dim Attachment as System.Web.Mail.MailAttachment
Dim Mailmsg as New System.Web.Mail.MailMessage

oMail.SmtpServer = "yyy.yyy.com"
Mailmsg.To = "(e-mail address removed)"
Mailmsg.From = "\Joe Blow\"
Mailmsg.BodyFormat = MailFormat.Html
Mailmsg.Subject = "TEST"
Attachment = New MailAttachment("C:\manifest.txt")
Mailmsg.Attachments.Add(Attachment)
oMail.Send(Mailmsg)

The attachment shows up as an icon in the message body when viewed in
Outlook. How do I make the attachment appear in the "header" and not as
an icon in the body? I need the body to be blank. I've tried setting
Mailmsg.body = "" and Mailmsg.BodyFormat = MailFormat.Text. Didn't change
anything.

Help very much appreciated !
 
E

Eric

Have you tried to attach some other types files such as **.txt or
**.doc, try it and see the result.
 
G

Guest

tried various attachments, no difference
It amazes me that this works in VB6.

DotNOT....another example of not ready for prime time garabge produced by
Microsoft.....
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top