473,378 Members | 1,495 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,378 software developers and data experts.

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 1429
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
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
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
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
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
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
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
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
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
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
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
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...

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.