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

Sending a mail using a RichTextBox

JMG
Hello,
How could I send a mail in html format with the RichTextBox control ?
I tried this but it doesn't work:

MailMessage objMail = new MailMessage ();
objMail.Body = myRichTextBox.Rtf;
objMail.BodyFormat = MailFormat.Html;

Thanks in advance.
Nov 16 '05 #1
3 8372
rtf is a very different format from HTML. You can use those formatters but
I don't think they do translations -95% sure of this, but I'll look around
and verify first.

Cheers,

Bill
"JMG" <an*******@discussions.microsoft.com> wrote in message
news:eh**************@TK2MSFTNGP10.phx.gbl...
Hello,
How could I send a mail in html format with the RichTextBox control ?
I tried this but it doesn't work:

MailMessage objMail = new MailMessage ();
objMail.Body = myRichTextBox.Rtf;
objMail.BodyFormat = MailFormat.Html;

Thanks in advance.

Nov 16 '05 #2
JMG
Thanks for your answer.
I keep on searching and will proceed differently if I find no solution.

"William Ryan eMVP" <do********@comcast.nospam.net> a écrit dans le message
de news:%2****************@TK2MSFTNGP11.phx.gbl...
rtf is a very different format from HTML. You can use those formatters but I don't think they do translations -95% sure of this, but I'll look around
and verify first.

Cheers,

Bill
"JMG" <an*******@discussions.microsoft.com> wrote in message
news:eh**************@TK2MSFTNGP10.phx.gbl...
Hello,
How could I send a mail in html format with the RichTextBox control ?
I tried this but it doesn't work:

MailMessage objMail = new MailMessage ();
objMail.Body = myRichTextBox.Rtf;
objMail.BodyFormat = MailFormat.Html;

Thanks in advance.


Nov 16 '05 #3
JMG
The RichTextBox will produce RTF code, not HTML code.

Use the DHTML Edit control instead:

Right-click the toolbox -> "Add/Remove Elements..." ->
"COM Controls" -> "DHTML Edit Control for IE5".

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
Nov 16 '05 #4

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

Similar topics

3
by: vishal | last post by:
i am getting following error. Warning: mail() : Failed to connect to mailserver at "smtp.gmail.com" port 465, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() in...
1
by: Hari | last post by:
Hi all! I am trying to send mail using outlook in my web application. i am using Outlook Express. Actually i am saving it in DRAFTS folder instead of sending it. My system are in network. I hard...
16
by: Jon Masterson | last post by:
Hi Guys Another quick question please. I understand that to send mail using .NET I need to install the SMTP server. I have two XP Home edition machines here and neither of them show IIS in...
3
by: at | last post by:
Hi, I need to test a mail function through my IPS, who doesn't allow sending mail without a password. Where do I specify this password? In php.ini I can specify SMTP and sender, but apparently...
2
by: ינון ×זרד | last post by:
Hi. I tring to send a email. I wrote the following lines: (Imports System.Net.Mail) Dim MailMsg As New MailMessage Dim WithEvents MailSmtp As New SmtpClient MailSmtp.Host = gmail.smtp.com...
2
by: prasenjit2007 | last post by:
Hello, can u help me sending Email with attachments using the Class phpMailer. On the website I have a link to an html form in which I input the parameters with the names 1)from(textbox name)...
0
debasisdas
by: debasisdas | last post by:
The follwing sample code uses predefined package UTL_SMTP to send mail. This package was first available in the version 8.1.7 . create or replace procedure sendmail(sender varchar2,recipient...
1
by: dilip1076 | last post by:
I developed an application to send mail using smtpClient. my mail server is mail.brm.edu.in. I am passing this as "smtp.mail.brm.edu.in" but i'm unable to send. It shows failure sending mail. plz...
4
by: Kapil Choubisa | last post by:
Hello all I am using smtp for sending mail. it ask the smtp host name. that is smtp.Host = "smtp.gmail.com"; what is for yahoo/rediff/hotmail is there any one for globle mail systems.
0
by: m103069 | last post by:
Dear Friend, I am developing an application where i am using System.Net.Mail Namespace. its working fine if mail sending through hosting server but i am not able to send mail using lotus note...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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...
0
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
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
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.