You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@poi.apache.org by bu...@apache.org on 2012/10/23 14:04:36 UTC

[Bug 54043] getHtmlBody

https://issues.apache.org/bugzilla/show_bug.cgi?id=54043

Nick Burch <ap...@gagravarr.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |INVALID
                 OS|                            |All

--- Comment #1 from Nick Burch <ap...@gagravarr.org> ---
Please ask usage questions on the mailing list -
http://poi.apache.org/mailinglists.html - bugzilla is just for bugs

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


Re: [Bug 54043] getHtmlBody

Posted by Nick Burch <ap...@gagravarr.org>.
On Thu, 25 Oct 2012, Apache wrote:
> Could I have a example from a MSG file with the body in HTML or RTF? So 
> I can use well the both methods "getHtmlBody()" and "getRtfBody()".

http://svn.apache.org/repos/asf/poi/trunk/test-data/hsmf/ has lots of 
sample files

Nick

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


Re: [Bug 54043] getHtmlBody

Posted by Apache <we...@gmail.com>.
Hi, 

Could I have a example from a MSG file with the body in HTML or RTF? 
So I can use well the both methods "getHtmlBody()" and "getRtfBody()".

Thanks.



--
View this message in context: http://apache-poi.1045710.n5.nabble.com/Bug-54043-New-getHtmlBody-tp5711261p5711291.html
Sent from the POI - Dev mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


Re: [Bug 54043] getHtmlBody

Posted by Nick Burch <ap...@gagravarr.org>.
On Wed, 24 Oct 2012, Apache wrote:
> I see the properties of the MSG files and the Content-types are;
>
> --> Content-Type: application/ms-tnef; name="winmail.dat"
> --> Content-Type: multipart/mixed;
> --> Content-Type: text/plain; charset="ISO-8859-1"

It has a TNEF encoded RTF message body by the looks of it. You'll need to 
grab the RTF and parse that to get the richly formatted message.

> How may be the Content-types of the MSG files to run well the method 
> "getHtmlBody()"?

getHtmlBody will only work for messages where the body is stored as native 
HTML, rather than as compressed RTF. Unfortunately, a large proportion of 
MSG files store the message body as RTF not HTML so you'll need to fetch 
them that way

Nick

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


Re: [Bug 54043] getHtmlBody

Posted by Apache <we...@gmail.com>.
Hi, thanks for your answer.

I see the properties of the MSG files and the Content-types are;

--> Content-Type: application/ms-tnef; name="winmail.dat"
--> Content-Type: multipart/mixed;
--> Content-Type: text/plain; charset="ISO-8859-1"

How may be the Content-types of the MSG files to run well the method
"getHtmlBody()"?





--
View this message in context: http://apache-poi.1045710.n5.nabble.com/Bug-54043-New-getHtmlBody-tp5711261p5711283.html
Sent from the POI - Dev mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


Re: [Bug 54043] getHtmlBody

Posted by Apache <we...@gmail.com>.
Hi, thanks for your answer. 

I see the properties of the MSG files and the Content-types are; 

--> Content-Type: application/ms-tnef; name="winmail.dat" 
--> Content-Type: multipart/mixed; 
--> Content-Type: text/plain; charset="ISO-8859-1" 

How may be the Content-types of the MSG files to run well the method
"getHtmlBody()"? 

Werner



--
View this message in context: http://apache-poi.1045710.n5.nabble.com/Bug-54043-New-getHtmlBody-tp5711261p5711284.html
Sent from the POI - Dev mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


Re: [Bug 54043] getHtmlBody

Posted by Nick Burch <ap...@gagravarr.org>.
On Wed, 24 Oct 2012, Apache wrote:
> Please, in my opinion if and calling the JAVA POI method getHtmlBody to 
> process and html format MSG and it is returning nothing I think it is a 
> bug.

Are you sure that your file has a real HTML body? Lots of Outlook files 
have an RTF body rather than a HTML one. Did you try seeing if your file 
is one of them?

(If your file is a RTF one, you'll be able to get your pretty formatted 
message body from the RTF, or use something like Apache Tika to try to get 
the RTF converted into HTML)

Nick

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


Re: [Bug 54043] getHtmlBody

Posted by Apache <we...@gmail.com>.
Please, in my opinion if and calling the JAVA POI method getHtmlBody to
process 
and html format MSG and it is returning nothing I think it is a bug.

Could you please give me some information about why is returning nothing ?
Could I send you any MSG sample ?




--
View this message in context: http://apache-poi.1045710.n5.nabble.com/Bug-54043-New-getHtmlBody-tp5711261p5711281.html
Sent from the POI - Dev mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org