You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-user@james.apache.org by Gino <li...@yinhoo.com> on 2006/12/13 00:38:54 UTC
database problem
Hi,
I try to get a email directly from james' database instead of throught POP3.listed below is part of my program.
String retrieveMessageBodySQL="SELECT message_body FROM inbox";
PreparedStatement retrieveMessageStream = null;
ResultSet rsRetrieveMessageStream = null;
retrieveMessageStream = conn.prepareStatement(retrieveMessageBodySQL);
rsRetrieveMessageStream = retrieveMessageStream.executeQuery();
InputStream is=rsRetrieveMessageStream.getBinaryStream(1);
Properties proper=new Properties();
proper.put("mail.smtp.host","localhost"); (running a local james email server)
proper.put("mail.smtp.auth","true");
Session session=Session.getInstance(proper);
Message msg=new MimeMessage(session,is);(here I construct the msg)
then I use javamail API to parse the message hopeto get he email content ,but a Exception happen
javax.mail.MessagingException: Missing start boundary
the parse program is correct,and I know the Exception happens is because the Message I created this way is a illegal MimeMessage
so the Messge's Multipart can't be parsed.I wonder what I can do toresolve the problem and get the email content by this way .I mean
get a legal email directly from james' database
Gino
2006-12-12
Re: database problem
Posted by Danny Angus <da...@gmail.com>.
is the message body actually well formed? How are you "use[ing]
javamail API to parse the message"?
---------------------------------------------------------------------
To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
For additional commands, e-mail: server-user-help@james.apache.org