How are you spitting out the contents of the mail? Are you using a
stream of some sort? Are you forgetting to flush/close the stream?
On Tue, May 20, 2008 at 6:45 AM, Davidoff <[EMAIL PROTECTED]> wrote:
>
> wonderful...the problem now is that some mail do not render completely...i
> don't see any tags now, i see the rendered mail, but some mails are half
> rendered, maybe a part of these contain text/plain?
>
> Michael Sparer wrote:
>>
>> i mean label.setEscapeModelStrings(false) ;-)
>>
>> Michael Sparer wrote:
>>>
>>> try label.setEscapeModelStrings(true)
>>>
>>>
>>> Davidoff wrote:
>>>>
>>>> I'm developing a simple webmail application...i want to render in HTML
>>>> what is in a MIME multipart message...now here is the code:
>>>>
>>>> GetMessage.java
>>>>
>>>> public abstract class GetMessage extends Panel {
>>>> private MultiLineLabel text;
>>>> private String type;
>>>>
>>>> public GetMessage(String id,Message msg,int index) throws
>>>> MessagingException, IOException {
>>>> super(id);
>>>> add(new Label("num",String.valueOf(index)));
>>>> add(new Label("sub",msg.getSubject().toString()));
>>>> add(new Label("sender",msg.getFrom()[0].toString()));
>>>> add(new Label("dat",msg.getSentDate().toString()));
>>>>
>>>> Object content = msg.getContent();
>>>>
>>>> if( content instanceof String){
>>>> text=new MultiLineLabel("content",content.toString());
>>>>
>>>>
>>>> }else{
>>>> Multipart multi = (Multipart)content;
>>>> for(int j=0; j<multi.getCount(); ++j){
>>>> BodyPart part = multi.getBodyPart(j);
>>>> type = part.getContentType();
>>>> content = part.getContent();
>>>> if( content instanceof String){
>>>> text=new MultiLineLabel("content", content.toString());
>>>> }
>>>> }
>>>> }
>>>> add(text);
>>>> add(new Label("prova1",type));
>>>>
>>>> }
>>>> }
>>>>
>>>> GetMessage.html
>>>>
>>>> <wicket:panel>
>>>>
>>>> <table>
>>>> <tr><th>#</th><td class="even" wicket:id="num"></td></tr>
>>>> <tr><th>Subject</th><td class="odd" wicket:id="sub"></td></tr>
>>>> <tr><th>Sender</th><td class="even" wicket:id="sender"></td></tr>
>>>> <tr><th>Date</th><td class="odd" wicket:id="dat"></td></tr>
>>>> <tr><td colspan=2><div wicket:id="content"></div></td></tr>
>>>> </table>
>>>>
>>>> LAbel
>>>> </wicket:panel>
>>>>
>>>>
>>>> The problem is the MultiLineLabel shows not the HTML resulting
>>>> rendering, but the HTML code itself!
>>>> My target is to render the html code that is in the content.toString()
>>>>
>>>
>>>
>>
>>
>
> --
> View this message in context:
> http://www.nabble.com/Html-mail-representation-tp17337174p17337580.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]