This is a migrated thread and some comments may be shown as answers.

how to send radeditor boldtext and forecolor through SMTP

5 Answers 102 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Saimadhukar
Top achievements
Rank 1
Saimadhukar asked on 11 Nov 2011, 02:37 PM

Hi,
i have been using radeditor for email application as body for sending text ,if we send bold text or text with forecolours  through smtp to other mails like gmail e.t.c the text we are sending in bold or with forecolour are displayed as simple text without colour  ,how to solve this any idea i amsending smtp code please respond,thanks.

try
       {
           DbLayer objDB = new DbLayer();
           System.Net.Mail.MailMessage Message = new System.Net.Mail.MailMessage();           
           Message.To.Add(rdtxtTo.Text);
           if (rdtxtCC.Text != string.Empty)
           {
               Message.CC.Add(rdtxtCC.Text);
           }
           if (rdtxtBcc.Text != string.Empty)
           {
               Message.Bcc.Add(rdtxtBcc.Text);
           }
           Message.Subject = rdtxtSubject.Text;
         //Discalimercode
           CreateEventEntities objentity = new CreateEventEntities();
         
           var mailDisclaimers = from c in objentity.Disclaimers where c.DisclaimerID == 1 select c;
           if (mailDisclaimers.ToList().Count > 0 && mailDisclaimers.ToList()[0].DisclaimerID != 0)
           {
               if (mailDisclaimers.ToList()[0].DisclaimerText.ToString().Length > 0)
                   Disctext = mailDisclaimers.ToList()[0].DisclaimerText.ToString();
               Disctext = "<br/><br/><br/><br/><br/>" + Disctext;
           }
           rdeditortxt.Content =  rdeditortxt.Content + Disctext;
             
              Message.Body =  rdeditortxt.Text;
           System.Net.Mail.SmtpClient SmtpClient = new System.Net.Mail.SmtpClient("smtp.gmail.com", 587);
           SmtpClient.EnableSsl = true;
           SmtpClient.Credentials = new System.Net.NetworkCredential("abc.com", "abc");
           System.Net.Mail.MailAddress FromEmail = new System.Net.Mail.MailAddress(TextBox1.Text);
           Message.From = FromEmail;
              SmtpClient.Send(Message);

5 Answers, 1 is accepted

Sort by
0
Rumen
Telerik team
answered on 11 Nov 2011, 06:00 PM
Hi Saimadhukar,

My suggestion is to enable the ConvertInlineStylesToAttributes content filter which converts XHTML compliant inline style attributes to Email compliant element attribut. This filter is improved and the fixes will appear in  the Q3 2011 release which is scheduled for the middle of next week.

Best regards,
Rumen
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
0
Saimadhukar
Top achievements
Rank 1
answered on 18 Nov 2011, 06:59 AM
Hello Rumen,

thanks for response can we use inlinestyles to attributes we have in present version .

0
Saimadhukar
Top achievements
Rank 1
answered on 18 Nov 2011, 08:36 AM

hello,
 i have used the Convert inline style to attributes filter but its not working ,the bold and underlined content are appearing as simple text in webbrowsers when we sent mail through smtp to gmail or e.t.c . 
0
Rumen
Telerik team
answered on 18 Nov 2011, 04:43 PM
Hello Saimadhukar,

Please tell us which tags do you expect to be produced for bold and underlined content by RadEditor so that we can provide a solution?

Best regards,
Rumen
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
0
Saimadhukar
Top achievements
Rank 1
answered on 21 Nov 2011, 07:00 AM
Hello Rumen ,

actually the problem is solved  by adding the Html tags between radeditor content,i am sending the below code for reference ,thank u for ur support.

Regards,
Madhukar.
rdtxtBody.Content =  rdtxtBody.Content + Disctext;
            
            
           Message.IsBodyHtml = true;
           
           Message.Body = "<Html><Body>"+ rdtxtBody.Content + "</Body> </Html>";
Tags
Editor
Asked by
Saimadhukar
Top achievements
Rank 1
Answers by
Rumen
Telerik team
Saimadhukar
Top achievements
Rank 1
Share this question
or