473,487 Members | 2,452 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

HTML Email

How do I send HTML email with the System.Web.Mail namespace?
I tried to put <HTML><HEAD></HEAD><BODY><b>Test</b></BODY></HTML>
in the body of the email, but it didn't work. MY html tags became text.

What can I do?
Nov 19 '05 #1
7 1432
Hi,

You need to set the

Mail.BodyFormat = MailFormat.Html

(Assuming Mail is the name of your mail object).

Best regards,
Dave Colliver.
http://www.ManchesterFOCUS.com
~~
http://www.FOCUSPortals.com - Local franchises available
"Arne" <Ar**@discussions.microsoft.com> wrote in message
news:50**********************************@microsof t.com...
How do I send HTML email with the System.Web.Mail namespace?
I tried to put <HTML><HEAD></HEAD><BODY><b>Test</b></BODY></HTML>
in the body of the email, but it didn't work. MY html tags became text.

What can I do?

Nov 19 '05 #2
>You need to set the

Mail.BodyFormat = MailFormat.Html
Do you know if it can handle multi-part e-mails? What I mean is ones
sent in both plain text and HTML. That way, the e-mail client being used
can display whichever it feels (or the user has specified).

Thanks.
(Assuming Mail is the name of your mail object).

Best regards,
Dave Colliver.
http://www.ManchesterFOCUS.com
~~
http://www.FOCUSPortals.com - Local franchises available
"Arne" <Ar**@discussions.microsoft.com> wrote in message
news:50**********************************@microso ft.com...
How do I send HTML email with the System.Web.Mail namespace?
I tried to put <HTML><HEAD></HEAD><BODY><b>Test</b></BODY></HTML>
in the body of the email, but it didn't work. MY html tags became text.

What can I do?



--
Alan Silver
(anything added below this line is nothing to do with me)
Nov 19 '05 #3
Yes it does.

"Alan Silver" wrote:
You need to set the

Mail.BodyFormat = MailFormat.Html


Do you know if it can handle multi-part e-mails? What I mean is ones
sent in both plain text and HTML. That way, the e-mail client being used
can display whichever it feels (or the user has specified).

Thanks.
(Assuming Mail is the name of your mail object).

Best regards,
Dave Colliver.
http://www.ManchesterFOCUS.com
~~
http://www.FOCUSPortals.com - Local franchises available
"Arne" <Ar**@discussions.microsoft.com> wrote in message
news:50**********************************@microso ft.com...
How do I send HTML email with the System.Web.Mail namespace?
I tried to put <HTML><HEAD></HEAD><BODY><b>Test</b></BODY></HTML>
in the body of the email, but it didn't work. MY html tags became text.

What can I do?



--
Alan Silver
(anything added below this line is nothing to do with me)

Nov 19 '05 #4
>Yes it does.

OK, maybe I should have been a bit more specific with my question!!

*How* do you do these types of e-mails? I couldn't see anything in the
SDK - which doesn't mean it's not there, just that I couldn't find it.

TIA
"Alan Silver" wrote:
>You need to set the
>
>Mail.BodyFormat = MailFormat.Html


Do you know if it can handle multi-part e-mails? What I mean is ones
sent in both plain text and HTML. That way, the e-mail client being used
can display whichever it feels (or the user has specified).

Thanks.
>(Assuming Mail is the name of your mail object).
>
>Best regards,
>Dave Colliver.
>http://www.ManchesterFOCUS.com
>~~
>http://www.FOCUSPortals.com - Local franchises available
>
>
>"Arne" <Ar**@discussions.microsoft.com> wrote in message
>news:50**********************************@microso ft.com...
>> How do I send HTML email with the System.Web.Mail namespace?
>> I tried to put <HTML><HEAD></HEAD><BODY><b>Test</b></BODY></HTML>
>> in the body of the email, but it didn't work. MY html tags became text.
>>
>> What can I do?
>
>


--
Alan Silver
(anything added below this line is nothing to do with me)


--
Alan Silver
(anything added below this line is nothing to do with me)
Nov 19 '05 #5
Mail.BodyFormat = MailFormat.Html
will send both text and HTML format in the same format.
No, the documentation will not tell you everything you need to know about
email.

"Alan Silver" wrote:
Yes it does.


OK, maybe I should have been a bit more specific with my question!!

*How* do you do these types of e-mails? I couldn't see anything in the
SDK - which doesn't mean it's not there, just that I couldn't find it.

TIA
"Alan Silver" wrote:
>You need to set the
>
>Mail.BodyFormat = MailFormat.Html

Do you know if it can handle multi-part e-mails? What I mean is ones
sent in both plain text and HTML. That way, the e-mail client being used
can display whichever it feels (or the user has specified).

Thanks.

>(Assuming Mail is the name of your mail object).
>
>Best regards,
>Dave Colliver.
>http://www.ManchesterFOCUS.com
>~~
>http://www.FOCUSPortals.com - Local franchises available
>
>
>"Arne" <Ar**@discussions.microsoft.com> wrote in message
>news:50**********************************@microso ft.com...
>> How do I send HTML email with the System.Web.Mail namespace?
>> I tried to put <HTML><HEAD></HEAD><BODY><b>Test</b></BODY></HTML>
>> in the body of the email, but it didn't work. MY html tags became text.
>>
>> What can I do?
>
>

--
Alan Silver
(anything added below this line is nothing to do with me)


--
Alan Silver
(anything added below this line is nothing to do with me)

Nov 19 '05 #6
>Mail.BodyFormat = MailFormat.Html
will send both text and HTML format in the same format.
Thanks. How do I set the two body texts? I would want a plain text one
and an HTML one. AFAICS, there is only the one Body property, which
presumably uses the MailFormat property to decide how to display the
contents. I can't see how you do multi-part messages.

Thanks
No, the documentation will not tell you everything you need to know about
email.

"Alan Silver" wrote:
>Yes it does.


OK, maybe I should have been a bit more specific with my question!!

*How* do you do these types of e-mails? I couldn't see anything in the
SDK - which doesn't mean it's not there, just that I couldn't find it.

TIA
>"Alan Silver" wrote:
>
>> >You need to set the
>> >
>> >Mail.BodyFormat = MailFormat.Html
>>
>> Do you know if it can handle multi-part e-mails? What I mean is ones
>> sent in both plain text and HTML. That way, the e-mail client being used
>> can display whichever it feels (or the user has specified).
>>
>> Thanks.
>>
>> >(Assuming Mail is the name of your mail object).
>> >
>> >Best regards,
>> >Dave Colliver.
>> >http://www.ManchesterFOCUS.com
>> >~~
>> >http://www.FOCUSPortals.com - Local franchises available
>> >
>> >
>> >"Arne" <Ar**@discussions.microsoft.com> wrote in message
>> >news:50**********************************@microso ft.com...
>> >> How do I send HTML email with the System.Web.Mail namespace?
>> >> I tried to put <HTML><HEAD></HEAD><BODY><b>Test</b></BODY></HTML>
>> >> in the body of the email, but it didn't work. MY html tags became text.
>> >>
>> >> What can I do?
>> >
>> >
>>
>> --
>> Alan Silver
>> (anything added below this line is nothing to do with me)
>>


--
Alan Silver
(anything added below this line is nothing to do with me)


--
Alan Silver
(anything added below this line is nothing to do with me)
Nov 19 '05 #7
thanks everyone for the replies.

"Alan Silver" wrote:
Mail.BodyFormat = MailFormat.Html
will send both text and HTML format in the same format.

Thanks. How do I set the two body texts? I would want a plain text one
and an HTML one. AFAICS, there is only the one Body property, which
presumably uses the MailFormat property to decide how to display the
contents. I can't see how you do multi-part messages.

Thanks
No, the documentation will not tell you everything you need to know about
email.

"Alan Silver" wrote:
Yes it does.

OK, maybe I should have been a bit more specific with my question!!

*How* do you do these types of e-mails? I couldn't see anything in the
SDK - which doesn't mean it's not there, just that I couldn't find it.

TIA

"Alan Silver" wrote:

You need to set the

Mail.BodyFormat = MailFormat.Html

Do you know if it can handle multi-part e-mails? What I mean is ones
sent in both plain text and HTML. That way, the e-mail client being used
can display whichever it feels (or the user has specified).

Thanks.

(Assuming Mail is the name of your mail object).

Best regards,
Dave Colliver.
http://www.ManchesterFOCUS.com
~~
http://www.FOCUSPortals.com - Local franchises available
"Arne" <Ar**@discussions.microsoft.comwrote in message
news:50**********************************@microsof t.com...
How do I send HTML email with the System.Web.Mail namespace?
I tried to put <HTML><HEAD></HEAD><BODY><b>Test</b></BODY></HTML>
in the body of the email, but it didn't work. MY html tags became text.

What can I do?



--
Alan Silver
(anything added below this line is nothing to do with me)
--
Alan Silver
(anything added below this line is nothing to do with me)

--
Alan Silver
(anything added below this line is nothing to do with me)
Aug 24 '06 #8

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

Similar topics

3
2233
by: D. Alvarado | last post by:
Hello, I have signed up a for a Google Gmail account. I sent myself some PHP-generated HTML emails from two different machines using this code: $to = "dave@gmail.com"; $id = 1234; $from =...
1
2732
by: Benny Ng | last post by:
Hi, I have created a program that can send and receive email.I would like to know how can i give my program the ability to view html emails? It currently shows html email in html codes.Please...
4
2950
by: Francois Keyeux | last post by:
hello everyone: i have a web site built using vbasic active server scripting running on iis (it works on either iis 50 and 60, but is designed for iis 50) i know how to create a plain text...
17
2451
by: Lloyd Sheen | last post by:
This IDE is driving me nuts. I needed another button so I copied an existing one, changed the Text and the id and position by drag and drop. Well then I run and get the following: Control...
4
1955
by: clintonG | last post by:
Technically speaking, this issue is not about modifying the HTML generated by server controls but preceding the HTML generated by server controls with an HTML control generated on the basis of the...
6
5474
by: Paolo Pignatelli | last post by:
I have an aspx code behind page that goes something like this in the HTML view: <asp:HyperLink id=HyperLink1 runat="server" NavigateUrl='<%#"mailto:" &amp;...
21
2698
by: maya | last post by:
hi, I'm designing an HTML email for a client.. I know general guidelines (no CSS, no JavaScript... although I do use limited CSS, inside tags (as in <span style=".."we do this at work and it...
15
5236
by: lxyone | last post by:
Using a flat file containing table names, fields, values whats the best way of creating html pages? I want control over the html pages ie 1. layout 2. what data to show 3. what controls to...
10
6931
by: happyse27 | last post by:
Hi All, I got this apache errors(see section A1 and A2 below) when I used a html(see section b below) to activate acctman.pl(see section c below). Section D below is part of the configuration...
2
18150
by: anu b | last post by:
Now i am sending email to my friend using session variable... but my code is as below private bool SendEmail(string email) { try
0
7106
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
6967
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...
0
7137
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
6846
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
4565
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...
0
3076
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3071
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1381
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
267
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...

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.