473,545 Members | 1,884 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

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.SmtpServe r = "yyy.yyy.co m"
Mailmsg.To = "jo*@xxx.co m"
Mailmsg.From = "\Joe Blow\"
Mailmsg.BodyFor mat = MailFormat.Html
Mailmsg.Subject = "TEST"
Attachment = New MailAttachment( "C:\manifest.tx t")
Mailmsg.Attachm ents.Add(Attach ment)
oMail.Send(Mail msg)

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.BodyFor mat = MailFormat.Text . Didn't change
anything.

Help very much appreciated !
Jul 21 '05 #1
2 1435
Have you tried to attach some other types files such as **.txt or
**.doc, try it and see the result.

Jul 21 '05 #2
tried various attachments, no difference
It amazes me that this works in VB6.

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

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

Jul 21 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
326
by: Cutlass | last post by:
Hello I'm using the following code to send mail from VB.NET 2003 oMail.SmtpServer = "xxx.xxx.com" Mailmsg.To = "joe@xxx.com" Mailmsg.From = "\Joe Blow\" Mailmsg.BodyFormat = MailFormat.Html Mailmsg.Subject = "TEST" Attachment = New MailAttachment(sDirectory & "\manifest.txt") Mailmsg.Attachments.Add(Attachment)
0
888
by: Cutlass | last post by:
Hello I'm using the following code to send mail from VB.NET 2003 oMail.SmtpServer = txtSMTPServer.Text Mailmsg.To = "joe@xxx.com" Mailmsg.From = "\Joe Blow\" Mailmsg.BodyFormat = MailFormat.Html Mailmsg.Subject = "TEST" Attachment = New MailAttachment(sDirectory & "\manifest.txt") Mailmsg.Attachments.Add(Attachment)
2
1352
by: Cutlass | last post by:
Hello I'm using the following code to send mail from VB.NET 2003 oMail.SmtpServer = "xxx.xxx.com" Mailmsg.To = "joe@xxx.com" Mailmsg.From = "\Joe Blow\" Mailmsg.BodyFormat = MailFormat.Html Mailmsg.Subject = "TEST" Attachment = New MailAttachment(sDirectory & "\manifest.txt") Mailmsg.Attachments.Add(Attachment)
2
246
by: Cutlass | last post by:
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
0
7410
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7923
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7437
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7773
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
5984
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
4960
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3448
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1025
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
722
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.