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? 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?
>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)
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)
>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)
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)
>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)
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) This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
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 =...
|
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...
|
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...
|
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...
|
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...
| |
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:" &...
|
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...
|
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...
|
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...
|
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
|
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,...
| |
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...
|
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,...
|
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...
|
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...
|
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...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
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 ...
|
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...
| |