Alan,
you wrote:
"I have developed a mailet, it works well when receiving mail from MS
outLook
Express, hotmail, netscape messenger.
But an exception is throw when receiving mail from MS outLook.
The exception thrown at :
MimeMultipart mp = (MimeMultipart) mail.getMessage().getContent();
a class cast exception is thrown"
Two points,
1/ sending an email to the users or developers list
http://jakarta.apache.org/site/mail.html would probably be more appropriate
for this kind of support, its not really a bug.
2/ the line MimeMultipart mp = (MimeMultipart)
mail.getMessage().getContent();
Will throw this exception if the message is *not* MIME type multipart/*
As there are a zillion other types it can be you should use
MimeMessage message = mail.getMessage();
String type = message.getContentType();
and then getContent() into an appropriate object according to the
content-type expected.
Or .. Object x = mail.getMessage().getContent();
and only cast it to multipart once you know that you can.
d.
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>