Thanks for all replies!
Hi Tor,
Sending mail is ok as you see but error occurs when i am getting the mail
body using my custom mailet . i could not read turkish characters.
I dont want to see ' ı ' as ' ? ' :)
Here is the mailet code.I am holding body of mail in "String message" but
as i described, message includes ???? rather than ııııı
org.apache.mailet.Mail
service (Mail mail){
MimeMessage messagePart = mail.getMessage();
String message;
if (messagePart.isMimeType("multipart/*")) {
Multipart mp = (Multipart) messagePart.getContent();
for (int j = 0; j < 1; j++) {
message = mp.getBodyPart(j).getContent().toString();
}
Object obj = messagePart.getContent();
if (obj instanceof Multipart) {
Multipart mp1 = (Multipart) obj;
for (int n = 0; n < 1; n++) {
message =
mp1.getBodyPart(n).getContent().toString();
Object obj2 = mp1.getBodyPart(n).getContent();
if (obj2 instanceof Multipart) {
Multipart mp2 = (Multipart) obj2;
for (int m = 0; m < 1; m++) {
message = mp2.getBodyPart(m).getContent()
.toString();
Object obj3 =
mp2.getBodyPart(m).getContent();
if (obj3 instanceof Multipart) {
Multipart mp3 = (Multipart) obj3;
for (int p = 0; p < 1; p++) {
message = mp3.getBodyPart(p)
.getContent().toString();
}
}
}
}
}
}
}
}
2009/3/3 Tor-Einar Jarnbjo <[email protected]>
> Hi Okan,
>
> the mail looks ok to me. If I read the raw message and iterate over it like
> here:
>
> MimeMessage msg = new MimeMessage(null, new
> FileInputStream("f:/mail.txt"));
> MimeMultipart content = (MimeMultipart) msg.getContent();
> for(int i=0; i < content.getCount(); i++) {
> MimeBodyPart body = (MimeBodyPart)content.getBodyPart(i);
> System.out.println(body.getContentType());
> System.out.println(body.getContent());
> }
>
> i get the following output:
>
> text/plain; charset=UTF-8
> show this :::: ıııııııııı
>
> text/html; charset=UTF-8
> show this :::: ıııııııııı<br>
>
> which is probably what you expected (dotless i). Are you sure you are not
> simply logging with a character set not capable of representing ı, so that
> the character is logged as a question mark? I did this as a standalone test
> with JavaMail 1.4 and I'm not 100% which version James is using, but I
> wouldn't expect earlier JavaMail versions to be buggy in such a vital point
> as evaluating the character set declaration in the content type field.
>
> Tor
>
>
> Okan Cetin schrieb:
>
>> i have no permission to access mail directory of james but when i look
>> from
>> gmail show original menu ->
>>
>> MIME-Version: 1.0
>> ....
>>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>