Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7899569
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T08:44:12+00:00 2026-06-03T08:44:12+00:00

I am using TinyMCE in my website to get some data I am storing

  • 0

I am using TinyMCE in my website to get some data

I am storing the data in the MySQL database .. I am storing the HTML generated from the RTE to the database

It works fine when I have to display the data on a browser and everything is neatly formatted

However When I try to send that via email … I get HTML in the email (and that too escaped)

Emailer code (just a start) is as follows:

public static void sendMail(String to, String from, String subject, String content) 
throws Exception
{
    if(!ScribeBookConstants.isEmailEnabled())
        return;

    //String host = "s155.eatj.com";
    String host = ScribeBookConstants.getEmailHost();

    Properties props = new Properties();
    props.put("mail.smtp.host", host);
    props.put("mail.smtp.auth", "true");

    SMTPAuthenticator auth = new SMTPAuthenticator();

    Session session = Session.getDefaultInstance(props, auth);

    Message msg = new MimeMessage(session);
    msg.setFrom(new InternetAddress(from));
    InternetAddress[] address = {new InternetAddress(to)};

    msg.setRecipients(Message.RecipientType.TO, address);

    msg.setSubject(subject);
    msg.setSentDate(new Date());
    msg.setText(content);

    Transport.send(msg);

}

I tried to send an email to a Gmail account … and get escaped HTML in the message text

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T08:44:14+00:00Added an answer on June 3, 2026 at 8:44 am

    Actually found the solution

    I just had to set the content type to “text/html”

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i posted some data using tinymce (in a symfony project).while retrieving back how can
I`m using tinymce as text editor on my website. Sometimes when I wrote some
I'm using TinyMCE with the tinymce-django app in my Django website. I am using
I'm currently using TinyMCE as html editor for users of my CMS. Somehow the
I'm using TinyMCE and want to execute a php script get the output and
I am using a tinyMce editor in our website. At the first pageload I
I have data stored using tinymce with placeholders before each table Editor view when
I have set up a form using TinyMCE in my MVC website. To do
I am using tinymce editor to have html page and then insert it in
I have a website that allows to enter HTML through a TinyMCE rich editor

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.