473,402 Members | 2,061 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,402 software developers and data experts.

Mails in HTML format

How do you tell the program that a mail (System.Net.Mail.MailMessage) is in
HTML format (VS 2005).

In earlier versions of VS there was a property called BodyFormat that you
could set to BodyFormat.HTML.

That doesn't seem to exist anymore in VS 2005 though?

Any ideas?

TIA,
Johnny J.
Jun 3 '07 #1
3 2105
On Jun 3, 6:52 pm, "Johnny Jörgensen" <j...@altcom.sewrote:
How do you tell the program that a mail (System.Net.Mail.MailMessage) is in
HTML format (VS 2005).

In earlier versions of VS there was a property called BodyFormat that you
could set to BodyFormat.HTML.

That doesn't seem to exist anymore in VS 2005 though?

Any ideas?

TIA,
Johnny J.
I believe it's mail.IsBodyHtml = true.

When in doubt, check out www.systemnetmail.com ...

Thanks,

Seth Rowe

Jun 4 '07 #2
Johnny,

In .NET 2.0, it is recommended to use the System.Net.Mail namespace, instead
of the System.Web.Mail namespace, which is now deprecated.

In the Net.Mail namespace, the MailMessage class has a property called
IsBodyHtml which takes a boolean parameter.
http://msdn2.microsoft.com/en-us/lib...sbodyhtml.aspx

Note: You can also set up multiple views (AlternateViews) to include both
HTML and plain text bodies.
http://msdn2.microsoft.com/en-us/lib...nateviews.aspx

Hope this helps,
Steve
"Johnny Jörgensen" <jo**@altcom.sewrote in message
news:ei*************@TK2MSFTNGP03.phx.gbl...
How do you tell the program that a mail (System.Net.Mail.MailMessage) is
in HTML format (VS 2005).

In earlier versions of VS there was a property called BodyFormat that you
could set to BodyFormat.HTML.

That doesn't seem to exist anymore in VS 2005 though?

Any ideas?

TIA,
Johnny J.

Jun 4 '07 #3
Thanks to both of you - I got it to work (and I DID actually use
System.Net - I only wrote the wrong code in the post...)

Cheers,
Johnny J.


"Johnny Jörgensen" <jo**@altcom.seskrev i meddelandet
news:ei*************@TK2MSFTNGP03.phx.gbl...
How do you tell the program that a mail (System.Net.Mail.MailMessage) is
in HTML format (VS 2005).

In earlier versions of VS there was a property called BodyFormat that you
could set to BodyFormat.HTML.

That doesn't seem to exist anymore in VS 2005 though?

Any ideas?

TIA,
Johnny J.

Jun 5 '07 #4

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

Similar topics

2
by: Yan | last post by:
Hi everyone, I got a little problem while sending HTML e-mails with CDONTS. I generate my e-mail body without problems into a string variable. When I display it to the browser via a...
8
by: LRW | last post by:
I'm not sure this message is totally appropriate for this group, so please, if anyone has a better group suggestion, let me know! My company sends out a monthly newsletter in HTML format to our...
3
by: Marcin Zmyslowski | last post by:
Hello all! Could you be so kind and gives me a function which creates mail in ASP language. But I would like to create a mail with ENTER breaklines and I would like to have background changed,...
7
by: Lau | last post by:
I need to send 1000 emails from an asp.net website. Normally I would use System.Web.Mail.MailMessage() to send thru an SMTP server. But the large amount of emails results in a timeout. My server...
6
by: Anuradha | last post by:
Dear All How can i send mails using vb.net Thanx all
2
by: Shimon Sim | last post by:
Is there a way to get e-mails with attachments using .NET 2.0? If not does anybody knows a component that can do this? Thank you, Shimon.
4
by: ethan220 | last post by:
Is it possible to read Outlook mails in PHP?? I would like to create a php program that reads mails from a particular person which are downloaded in MS Outlook. Ethan
17
by: rdemyan | last post by:
My app creates a building report. My users have requested that I provide functionality to e-mail these "building reports" to building managers once a month. So assuming that I have the...
7
by: oopsbabies | last post by:
Hello everyone, I am using Apache 1.3.33 as the web server and PHP version 4.3.10. My machine is using Windows XP 2002 professional edition which comes with a Windows firewall. I am using McAfee...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
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...
0
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...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.