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

  • SEARCH
  • Home
  • 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 8877993
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T19:36:18+00:00 2026-06-14T19:36:18+00:00

My target is to load an email message and if it’s a new one

  • 0

My target is to load an email message and if it’s a new one mark it as read.

So here is what I am doing:

        EmailMessage email=EmailMessage.bind(service,itemId);
        email.load();
        email.setSubject(GeneralUtils.replaceSpecialCharacters(email.getSubject()));
        email.setBody(MessageBody.getMessageBodyFromText(GeneralUtils.replaceSpecialCharacters(email.getBody().toString())));
        if(!email.getIsRead()){ 
          email.setIsRead(true);
          email.update(ConflictResolutionMode.AutoResolve);
        }

ISSUE: When reading the message body for first time (before marking the message as read)
I can read the message body correctly as follows:

This is message body

But after marking the message as read and update the message, when trying to load this email again, the message body loads as follows:

<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
This is message body
</body>
</html>

Please advise why I am getting this behavior, and how to solve it.

  • 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-14T19:36:19+00:00Added an answer on June 14, 2026 at 7:36 pm

    I fixed it by not setting the processed body, i removed the following line, and it works fine:

    email.setBody(MessageBody.getMessageBodyFromText(GeneralUtils.replaceSpecialCharacters(email.getBody().toString())));
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

$(document).ready(function(){ $(a[href*='http://']:not([href*='+location.hostname+'])).attr(target,_blank); $(a[target!='_blank'][target!='_top']).click(function(){ $(#actualcontent).load($(this).attr(href)); window.location.hash=$(this).attr(href); return false; }); }); So I have this code
i have got <div><a class='link' href='index.php' data-container='target'>Load</a></div> <div class='target'></div> i need to write jquery
I use jquery to load and fade in content in a target div. This
I have this ajax call: $('.ajaxtrigger2').click(function(){ $('#target').load('xxx.html'); ... how to append a Loading msg
I have several Java interfaces/ABCs/classes: public abstract class Target { public abstract void fire(Load
$(#page).ajaxStart(function(){ $(#loading).show(); }); $('#page').load('target.html', function() { $(#loading).hide(); } This is how I load my
I want to load one of four separate C# assemblies based upon what the
Target application is a medium-sized website built to support several hundred to several thousand
Target failed to run: Remote exception encountered: Faild to get task for pid 3103
setTimeout(target.mousedown, 200) doesn't seem to work. I can do setTimeout(target.mousedown(), 200) , but this

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.