Hi Stefano, thank you for your hint. By the way MimeMessage is either not serialized.
I used the workaround to send to a JMS Que (as you proposed): ByteArrayOutputStream os = new ByteArrayOutputStream(); mimeMessage.writeTo(os); String content = os.toString(); ObjectMessage mesg = jmsSession.createObjectMessage(content); jmsSender.send(mesg); And to read from a JMS Que: String content = (String)jmsMsg.getObject(); byte[] bytes = content.getBytes(); ByteArrayInputStream bis = new ByteArrayInputStream(bytes); MimeMessage emailMessage = new MimeMessage(null, bis); This helps. Thanks. Ataul > Well, mimemessages are intended to be serialized. In fact in pop3 and > smtp service we do that all of the time. Hint: > MimeMessage.writeTo(OutputStream out) and MimeMessage(InputStream source). > > Stefano > > Ataul Wadood Ahmad ha scritto: >> Hello, >> >> has somebody experience in sending emails from JAMES to JMS. >> The problem is that JavaMail API is in general not serialized and can't >> be >> send to a Messaging Service as an Object. Since I want to establish >> asynchronous communication streaming is no option. >> >> I appreciate any help. Thanks. >> >> Ataul > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- Ataul W. Ahmad -Certified Project Management Associate (GPM, IPMA)- -Sun Certified Java Developer- email: [EMAIL PROTECTED] Fon: +49 177 829 87 39 Fax: +49 571 398 13 77 --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
