Return-Path: X-Original-To: apmail-commons-issues-archive@minotaur.apache.org Delivered-To: apmail-commons-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id D200F10EFD for ; Thu, 25 Jul 2013 11:35:49 +0000 (UTC) Received: (qmail 65647 invoked by uid 500); 25 Jul 2013 11:35:49 -0000 Delivered-To: apmail-commons-issues-archive@commons.apache.org Received: (qmail 65582 invoked by uid 500); 25 Jul 2013 11:35:49 -0000 Mailing-List: contact issues-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: issues@commons.apache.org Delivered-To: mailing list issues@commons.apache.org Received: (qmail 65557 invoked by uid 99); 25 Jul 2013 11:35:48 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 25 Jul 2013 11:35:48 +0000 Date: Thu, 25 Jul 2013 11:35:48 +0000 (UTC) From: "Benedikt Ritter (JIRA)" To: issues@commons.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (EMAIL-129) hasPlainContent and hasHtmlContent both return false MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/EMAIL-129?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13719524#comment-13719524 ] Benedikt Ritter commented on EMAIL-129: --------------------------------------- Hi Oliver, thanks for the report. Where does {{rawEmail}} come from/how do you create it? Benedikt > hasPlainContent and hasHtmlContent both return false > ---------------------------------------------------- > > Key: EMAIL-129 > URL: https://issues.apache.org/jira/browse/EMAIL-129 > Project: Commons Email > Issue Type: Bug > Affects Versions: 1.3.1 > Environment: Ubuntu Linux 12 LTS, OpenJDK 7 > Reporter: Oliver Kohll > > Using the following code > InputStream is = new ByteArrayInputStream(rawEmail.getBytes()); > MimeMessage message = new MimeMessage(s, is); > MimeMessageParser emailParser = new MimeMessageParser(message); > if (emailParser.hasPlainContent()) { > logger.debug(emailParser.getPlainContent()); > } else if (emailParser.hasHtmlContent()) { > logger.debug(emailParser.getHtmlContent()); > } else { > throw new Exception("No content found for email"); > } > the Exception is thrown for sample rawEmail: > Return-Path: > X-Original-To: oliver@agilebase.co.uk > Delivered-To: oliver.gtwm@li349-29.members.linode.com > Received: from [192.168.1.5] (unknown [88.211.41.14]) > by li349-29.members.linode.com (Postfix) with ESMTPSA id D63B05AE4F7; > Thu, 25 Jul 2013 12:03:29 +0100 (BST) > From: Oliver Kohll > Content-Type: multipart/alternative; boundary="Apple-Mail=_E3FC6CFD-A540-4365-BA9C-6DDC7A28F052" > Subject: test > Date: Thu, 25 Jul 2013 12:03:31 +0100 > Message-Id: <8F52AB54-5366-41A6-8C4A-72895DC4D92A@agilebase.co.uk> > Cc: "contacts@gtwm.agilebase.co.uk" > To: "oliver@agilebase.co.uk" > Mime-Version: 1.0 (Mac OS X Mail 6.5 \(1508\)) > X-Mailer: Apple Mail (2.1508) > --Apple-Mail=_E3FC6CFD-A540-4365-BA9C-6DDC7A28F052 > Content-Transfer-Encoding: 7bit > Content-Type: text/plain; > charset=us-ascii > test content > www.agilebase.co.uk / 0117 321 0104 / 07814 828608 > www.twitter.com/agilebase > --Apple-Mail=_E3FC6CFD-A540-4365-BA9C-6DDC7A28F052 > Content-Transfer-Encoding: quoted-printable > Content-Type: text/html; > charset=us-ascii > charset=3Dus-ascii"> -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">test = > content
>
medium; font-style: normal; font-variant: normal; font-weight: normal; = > letter-spacing: normal; line-height: normal; orphans: 2; text-align: = > -webkit-auto; text-indent: 0px; text-transform: none; white-space: = > normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; = > -webkit-text-stroke-width: 0px; word-wrap: break-word; = > -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">
style=3D"color: rgb(0, 0, 0); font-family: Helvetica; font-size: medium; = > font-style: normal; font-variant: normal; font-weight: normal; = > letter-spacing: normal; line-height: normal; orphans: 2; text-align: = > -webkit-auto; text-indent: 0px; text-transform: none; white-space: = > normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; = > -webkit-text-stroke-width: 0px; word-wrap: break-word; = > -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "> class=3D"Apple-style-span" style=3D"border-collapse: separate; color: = > rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: = > normal; font-weight: normal; letter-spacing: normal; line-height: = > normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; = > text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; = > border-spacing: 0px; -webkit-text-decorations-in-effect: none; = > -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; = > font-size: medium; ">
-webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "> class=3D"Apple-style-span" style=3D"border-collapse: separate; color: = > rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: = > normal; font-weight: normal; letter-spacing: normal; line-height: = > normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; = > text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; = > border-spacing: 0px; -webkit-text-decorations-in-effect: none; = > -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; = > font-size: medium; ">
-webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "> class=3D"Apple-style-span" style=3D"border-collapse: separate; color: = > rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: = > normal; font-weight: normal; letter-spacing: normal; line-height: = > normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; = > text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; = > border-spacing: 0px; -webkit-text-decorations-in-effect: none; = > -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; = > font-size: medium; ">
-webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "> class=3D"Apple-style-span" style=3D"border-collapse: separate; color: = > rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: = > normal; font-weight: normal; letter-spacing: normal; line-height: = > normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; = > text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; = > border-spacing: 0px; -webkit-text-decorations-in-effect: none; = > -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; = > font-size: medium; ">
-webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "> class=3D"Apple-style-span" style=3D"border-collapse: separate; color: = > rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: = > normal; font-weight: normal; letter-spacing: normal; line-height: = > normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: = > normal; widows: 2; word-spacing: 0px; border-spacing: 0px; = > -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: = > auto; -webkit-text-stroke-width: 0px; font-size: medium; ">
style=3D"word-wrap: break-word; -webkit-nbsp-mode: space; = > -webkit-line-break: after-white-space; "> style=3D"border-collapse: separate; color: rgb(0, 0, 0); font-family: = > Helvetica; font-style: normal; font-variant: normal; font-weight: = > normal; letter-spacing: normal; line-height: normal; orphans: 2; = > text-indent: 0px; text-transform: none; white-space: normal; widows: 2; = > word-spacing: 0px; border-spacing: 0px; = > -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: = > auto; -webkit-text-stroke-width: 0px; font-size: medium; ">
style=3D"word-wrap: break-word; -webkit-nbsp-mode: space; = > -webkit-line-break: after-white-space; "> style=3D"border-collapse: separate; color: rgb(0, 0, 0); font-family: = > Helvetica; font-style: normal; font-variant: normal; font-weight: = > normal; letter-spacing: normal; line-height: normal; orphans: 2; = > text-indent: 0px; text-transform: none; white-space: normal; widows: 2; = > word-spacing: 0px; border-spacing: 0px; = > -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: = > auto; -webkit-text-stroke-width: 0px; font-size: medium; ">
style=3D"word-wrap: break-word; -webkit-nbsp-mode: space; = > -webkit-line-break: after-white-space; "> style=3D"border-collapse: separate; color: rgb(0, 0, 0); font-family: = > Helvetica; font-style: normal; font-variant: normal; font-weight: = > normal; letter-spacing: normal; line-height: normal; orphans: 2; = > text-indent: 0px; text-transform: none; white-space: normal; widows: 2; = > word-spacing: 0px; border-spacing: 0px; = > -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: = > auto; -webkit-text-stroke-width: 0px; font-size: medium; ">
style=3D"word-wrap: break-word; -webkit-nbsp-mode: space; = > -webkit-line-break: after-white-space; "> style=3D"border-collapse: separate; color: rgb(0, 0, 0); font-family: = > Helvetica; font-style: normal; font-variant: normal; font-weight: = > normal; letter-spacing: normal; line-height: normal; orphans: 2; = > text-indent: 0px; text-transform: none; white-space: normal; widows: 2; = > word-spacing: 0px; border-spacing: 0px; = > -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: = > auto; -webkit-text-stroke-width: 0px; font-size: medium; ">
style=3D"word-wrap: break-word; -webkit-nbsp-mode: space; = > -webkit-line-break: after-white-space; "> style=3D"border-collapse: separate; color: rgb(0, 0, 0); font-family: = > Helvetica; font-style: normal; font-variant: normal; font-weight: = > normal; letter-spacing: normal; line-height: normal; orphans: 2; = > text-indent: 0px; text-transform: none; white-space: normal; widows: 2; = > word-spacing: 0px; border-spacing: 0px; = > -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: = > auto; -webkit-text-stroke-width: 0px; font-size: medium; ">
style=3D"word-wrap: break-word; -webkit-nbsp-mode: space; = > -webkit-line-break: after-white-space; "> style=3D"border-collapse: separate; color: rgb(0, 0, 0); font-family: = > Helvetica; font-style: normal; font-variant: normal; font-weight: = > normal; letter-spacing: normal; line-height: normal; orphans: 2; = > text-indent: 0px; text-transform: none; white-space: normal; widows: 2; = > word-spacing: 0px; border-spacing: 0px; = > -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: = > auto; -webkit-text-stroke-width: 0px; font-size: medium; ">
style=3D"word-wrap: break-word; -webkit-nbsp-mode: space; = > -webkit-line-break: after-white-space; "> style=3D"border-collapse: separate; color: rgb(0, 0, 0); font-family: = > Helvetica; font-style: normal; font-variant: normal; font-weight: = > normal; letter-spacing: normal; line-height: normal; orphans: 2; = > text-indent: 0px; text-transform: none; white-space: normal; widows: 2; = > word-spacing: 0px; border-spacing: 0px; = > -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: = > auto; -webkit-text-stroke-width: 0px; font-size: medium; ">
style=3D"word-wrap: break-word; -webkit-nbsp-mode: space; = > -webkit-line-break: after-white-space; "> style=3D"border-collapse: separate; color: rgb(0, 0, 0); font-family: = > Helvetica; font-style: normal; font-variant: normal; font-weight: = > normal; letter-spacing: normal; line-height: normal; orphans: 2; = > text-indent: 0px; text-transform: none; white-space: normal; widows: 2; = > word-spacing: 0px; border-spacing: 0px; = > -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: = > auto; -webkit-text-stroke-width: 0px; font-size: medium; ">
style=3D"word-wrap: break-word; -webkit-nbsp-mode: space; = > -webkit-line-break: after-white-space; "> style=3D"border-collapse: separate; color: rgb(0, 0, 0); font-family: = > Helvetica; font-style: normal; font-variant: normal; font-weight: = > normal; letter-spacing: normal; line-height: normal; orphans: 2; = > text-indent: 0px; text-transform: none; white-space: normal; widows: 2; = > word-spacing: 0px; border-spacing: 0px; = > -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: = > auto; -webkit-text-stroke-width: 0px; font-size: medium; ">
style=3D"word-wrap: break-word; -webkit-nbsp-mode: space; = > -webkit-line-break: after-white-space; "> style=3D"border-collapse: separate; color: rgb(0, 0, 0); font-family: = > Helvetica; font-style: normal; font-variant: normal; font-weight: = > normal; letter-spacing: normal; line-height: normal; orphans: 2; = > text-indent: 0px; text-transform: none; white-space: normal; widows: 2; = > word-spacing: 0px; border-spacing: 0px; = > -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: = > auto; -webkit-text-stroke-width: 0px; font-size: medium; ">
style=3D"word-wrap: break-word; -webkit-nbsp-mode: space; = > -webkit-line-break: after-white-space; "> style=3D"border-collapse: separate; color: rgb(0, 0, 0); font-family: = > Helvetica; font-style: normal; font-variant: normal; font-weight: = > normal; letter-spacing: normal; line-height: normal; orphans: 2; = > text-indent: 0px; text-transform: none; white-space: normal; widows: 2; = > word-spacing: 0px; border-spacing: 0px; = > -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: = > auto; -webkit-text-stroke-width: 0px; font-size: medium; ">
style=3D"word-wrap: break-word; -webkit-nbsp-mode: space; = > -webkit-line-break: after-white-space; "> style=3D"border-collapse: separate; color: rgb(0, 0, 0); font-family: = > Helvetica; font-size: medium; font-style: normal; font-variant: normal; = > font-weight: normal; letter-spacing: normal; line-height: normal; = > orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; = > widows: 2; word-spacing: 0px; border-spacing: 0px; = > -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: = > auto; -webkit-text-stroke-width: 0px; ">
break-word; -webkit-nbsp-mode: space; -webkit-line-break: = > after-white-space; "> style=3D"border-collapse: separate; color: rgb(0, 0, 0); font-family: = > Helvetica; font-size: medium; font-style: normal; font-variant: normal; = > font-weight: normal; letter-spacing: normal; line-height: normal; = > orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; = > widows: 2; word-spacing: 0px; border-spacing: 0px; = > -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: = > auto; -webkit-text-stroke-width: 0px; ">
break-word; -webkit-nbsp-mode: space; -webkit-line-break: = > after-white-space; "> style=3D"border-collapse: separate; color: rgb(0, 0, 0); font-family: = > Helvetica; font-size: medium; font-style: normal; font-variant: normal; = > font-weight: normal; letter-spacing: normal; line-height: normal; = > orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; = > widows: 2; word-spacing: 0px; border-spacing: 0px; = > -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: = > auto; -webkit-text-stroke-width: 0px; ">
break-word; -webkit-nbsp-mode: space; -webkit-line-break: = > after-white-space; "> style=3D"border-collapse: separate; color: rgb(0, 0, 0); font-family: = > Helvetica; font-size: medium; font-style: normal; font-variant: normal; = > font-weight: normal; letter-spacing: normal; line-height: normal; = > orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; = > widows: 2; word-spacing: 0px; border-spacing: 0px; = > -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: = > auto; -webkit-text-stroke-width: 0px; "> style=3D"font-size: 12px; ">

class=3D"Apple-interchange-newline"> href=3D"http://www.agilebase.co.uk">www.agilebase.co.uk / 0117 321 = > 0104 / 07814 828608
>
<= > /div>
an>
>
>
= > --Apple-Mail=_E3FC6CFD-A540-4365-BA9C-6DDC7A28F052-- -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira