Hi, It is likely already to have tried.
This might be useful. Follow this thread: http://groups.google.com/group/google-appengine-java/browse_thread/thread/34fc6354a923e6af/c01e478a169b2e8f?#c01e478a169b2e8f Please try. thanks. On 2月11日, 午前10:36, moca <[email protected]> wrote: > 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 [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
