I am receiving the error below when receiving an email from Hotmail to an App Engine email Servlet. The same code works fine when receiving emails from Gmail and my cell for instance.
gui.EMailReceiverServlet doPost: Truncated quoted printable data java.io.IOException: Truncated quoted printable data at org.apache.geronimo.mail.util.QuotedPrintableEncoder.decodeNonspaceChar(QuotedPrintableEncoder.java: 597) at org.apache.geronimo.mail.util.QuotedPrintableEncoder.decode(QuotedPrintableEncoder.java: 584) at org.apache.geronimo.mail.util.QuotedPrintableDecoderStream.read(QuotedPrintableDecoderStream.java: 80) at org.apache.geronimo.mail.handlers.TextHandler.getContent(TextHandler.java: 107) at javax.activation.DataSourceDataContentHandler.getContent(Unknown Source) at javax.activation.DataHandler.getContent(Unknown Source) at javax.mail.internet.MimeMessage.getContent(MimeMessage.java:927) Fails early when sending email from Hotmail using "Plain Text" try { Properties props = new Properties(); Session session = Session.getDefaultInstance(props, null); MimeMessage message = new MimeMessage(session, request.getInputStream()); Address[] messageFrom = message.getFrom(); Address messageSender = message.getSender(); Address[] messageReplyTo = message.getReplyTo(); String messageSubject = message.getSubject(); Date messageSentDate = message.getSentDate(); String messageContentType = message.getContentType(); LOGGER.info("received email message.from: " + Arrays.toString(messageFrom) + " message.sender: " + messageSender + " message.replyTo: " + Arrays.toString(messageReplyTo) + " message.subject: " + messageSubject + " message.sentDate: " + messageSentDate + " message.contentType: " + messageContentType); Object messageContent; try { messageContent = message.getContent(); // THIS SHOULD WORK } catch (Exception e) { LOGGER.log(Level.SEVERE, e.getMessage(), e); ByteArrayOutputStream out = new ByteArrayOutputStream(); message.writeTo(out); A Snippet of what is printed by message.writeTo() (Notice the Content-Transfer-Encoding: quoted-printable and the exception: java.io.IOException: Truncated quoted printable data) Date: Wed, 10 Feb 2010 17:16:32 -0800 Importance: Normal Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginalArrivalTime: 11 Feb 2010 01:16:33.0369 (UTC) FILETIME=[D93A3C90:01CAAAB7] app =20 FYI: My message was "app" My message comes in, but it is not correctly parsed by the mail implementation. Does anyone know how to work around this?? Thanks -- You received this message because you are subscribed to the Google Groups "Google App Engine for Java" group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.