Setting the Font and the color to my message

G

Guest

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
 
G

Guest

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top