Hi Mathias,
im not 100 % sure.. But maybe this will work:
public void service(org.apache.mailet.Mail mail) throws
MessagingException {
content = mail.getMessage().getContent();
if (content != null && content instanceof MimeMultipart) {
MimeMultipart part = (MimeMultipart) content;
.....
}else{
ByteArrayInputStream is = new
ByteArrayInputStream(content.getBytes());
InputStream ds = MimeUtility.decode(is, "uuencode");
int b;
while ((b = ds.read()) >= 0) {
... do something ...
}
}
}
See:
http://api.globis.ethz.ch/javamail1.4/javax/mail/internet/MimeUtility.html#decode(java.io.InputStream,%20java.lang.String)
bye
Norman
Mathias Berg schrieb:
> Hi, i have a problem with some customers who is sending their mail to
> our James server (2.3.0).
>
> When we recieve their mail its says that
> mail.getMessage().getContent() is of instance String!
>
> And the output from the content looks like this
>
> ....
> M/#]X;[EMAIL PROTECTED]<VEO;CTB,2XP(B!E;F-O9&EN9STB551&[EMAIL
> PROTECTED]('-T86YD86QO
> M;F4](FYO(C\^"CQT<F%D941O=6)L97)096YD:6YG('AM;&YS.GAS:3TB:'1T
> M<#HO+W=W=RYW,RYO<F<O,C`P,2]834Q38VAE;6$M:6YS=&%N8V4B/@H@(#QC
> ....
>
> If im not wrong here the mail is uuencoded. How can i handle this cind
> of mails?
>
> --------------------------------------------
> Code example
>
> public void service(org.apache.mailet.Mail mail) throws
> MessagingException {
>
> content = mail.getMessage().getContent();
> if (content != null && content instanceof MimeMultipart) {
> MimeMultipart part = (MimeMultipart) content;
> .....
> }else{
> log.error(content)
> }
>
> --------------------------------------------
>
> It always ends up in the else block.
>
> Please help.
>
> Best regards, Mathias.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
> !EXCUBATOR:1,456feebe53074892353800!
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]