Hi all,

I use jackrabbit webdav client to access exchange server. Actually I
read email from folder, extract attached email, and i need to put this
email (the attached one) in an other folder. I tried to post to
message using to following code. dto.getAttachedMes() is valid
MimeMessage object.

But the result is a "char jam" in the first case and the plain/xml
MimeMessage in 2nd case.

Someone can help me.

Regards
Olindo Pindaro




public void postMail(ProtocolMailItemDto dto, String destFolder)
throws IOException, MessagingException{
                String name=dto.getProtocoller()+"_"+(new
Date())+"_"+dto.getAttachedMes().getSubject();
                String url=destFolder+"/"+URLEncoder.encode(name,"UTF-8");
                HttpClient httpclient =  
this.getServerPars().HttpClientFactory();
                PutMethod httpPut=new PutMethod(url);
            RequestEntity requestEntity = new
InputStreamRequestEntity(dto.getAttachedMes().getInputStream()); 1
case <<<<<<<<<<<<<<<<<<< I tried both...
           RequestEntity requestEntity = new
InputStreamRequestEntity(dto.getAttachedMes().getInputStream(),
"message/rfc822");2 case <<<<<<
            httpPut.setRequestEntity(requestEntity);
            try {
                httpclient.executeMethod(httpPut);
                JPLogger.info("postmail GetStatus
="+httpPut.getStatusLine(),this.getClass());
                } finally {
                        httpPut.releaseConnection();
                }
        
        }

-- 
Olindo Pindaro
http://www.linkedin.com/in/olindopindaro
+39 3939455830

Reply via email to