469,602 Members | 1,652 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,602 developers. It's quick & easy.

Setting the Font and the color to my message

Hi EveryBody:

I am doing windows application project by using Vb.Net. The function of this
project is to send e-mail by adding system.web.dll as refrance to my project
and using system.web.mail class to do so.

My question is:

When I write the message and I change the font to Verdana and change the
color to blue the message recived to the" To Address" as text message without
changing in font or color. I tried this in the two format for the e-mail
message either Text or HTML, but nothing Change ?

So any one can told me how can I send my message and I grantee that it will
recived as the font and color that I setted to it ?

Any help or redirection will be appreciated

regard's

Husam
Jan 9 '06 #1
1 1352
I'm assuming your writing this message in a RichTextBox, then sending the
string found in the RTB's Text proprety to the recipient, correct?

You have a couple of problems.

The Text property in the RTB doesn't include any formatting information,
it's just plain text. This is fine if you want your recipients to see
unformatted plain text.

Use the RTF property of the RichTextBox if you want to retain all the RTF
formatting information in the text, including color and bolding or italics
information.

Second, you can't send an RTF string to an email recipient and expect it to
render properly. Most email apps won't render RichTextFormatted text at all.
So, you have to convert the RTF Text to HTML. There is nothing in the .NET
Base Class Library that will do this for you. You'll need either a 3rd party
library to do this (Google for "RTF to HTML" to find some), or you'll have to
write your own conversion code. I'd search for a component because I loath
re-inventing the wheel.

--
<i><b>RageInTheMachine9532</b></i><font size="-2">
"<i>...a pungent, ghastly, stinky piece of cheese!</i>" <b>-- The Roaming
Gnome</b></font>
"Husam" wrote:
Hi EveryBody:

I am doing windows application project by using Vb.Net. The function of this
project is to send e-mail by adding system.web.dll as refrance to my project
and using system.web.mail class to do so.

My question is:

When I write the message and I change the font to Verdana and change the
color to blue the message recived to the" To Address" as text message without
changing in font or color. I tried this in the two format for the e-mail
message either Text or HTML, but nothing Change ?

So any one can told me how can I send my message and I grantee that it will
recived as the font and color that I setted to it ?

Any help or redirection will be appreciated

regard's

Husam

Jan 9 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

9 posts views Thread by netclectic | last post: by
18 posts views Thread by fleemo17 | last post: by
1 post views Thread by Mervin Williams | last post: by
14 posts views Thread by Roger Withnell | last post: by
reply views Thread by suresh191 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.