I create a java class to compose an email from input Text. Generally users copy/paste text from Word or from Outlook.
To create my Message I use this code:
MailMessage message = MailMessage.load(
new ByteArrayInputStream(htmlbody.getBytes()),
new HtmlLoadOptions());
Often the styles (font color, font-size, text-formating) are respected but sometime my message is read as a Plain Text message and styles are not there.
Is there any idea you have about my problem or some best-practice I can use?
Could you please share some file containing such a stream which can be used to reproduce the scenario here? It will help us to observe the problem and provide assistance accordingly.
We ran your sample code with the latest version of the API and the output generated is fine as you can see in attached file. Could you please share your output file or a screenshot of the output with us? Please try it with latest version of the API in case you are not doing it already. test.zip (8.7 KB)
thanks a lot.
I downloaded the last version and It works !!!
Unfortunatelly I have a regression. The solution that you propose me in this case Embedding image in oft template mail
it don’t work now!
If you need an example code, let me know.
If I have to close this thread and open another one, I will do.
It will be better if you create a new thread and attach any input source files and sample code with it for our analysis. We’ll look into it for assisting you further.