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

  • Thread starter Thread starter Guest
  • Start date Start date
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 !
 
Have you tried to attach some other types files such as **.txt or
**.doc, try it and see the result.
 
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.....
 
Back
Top