james-mime4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stefano Bagnara (JIRA)" <mime4j-...@james.apache.org>
Subject [jira] [Commented] (MIME4J-239) AddressBuilder#parseMailbox fails when the local part contains a '@'
Date Sun, 15 Jun 2014 15:42:01 GMT

    [ https://issues.apache.org/jira/browse/MIME4J-239?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14031956#comment-14031956
] 

Stefano Bagnara commented on MIME4J-239:
----------------------------------------

Have you tried Mailbox add = LenientAddressBuilder.DEFAULT.parseMailbox("joe@my company <joe.foo@company.com>");
 ?
Does this return an expected result to you? 

As Oleg said, mime4j already has 2 operation modes: strict and lenient. If you disable strict
parsing then mime4j is able to read also invalid mime streams.

Stefano

> AddressBuilder#parseMailbox fails when the local part contains a '@'
> --------------------------------------------------------------------
>
>                 Key: MIME4J-239
>                 URL: https://issues.apache.org/jira/browse/MIME4J-239
>             Project: James Mime4j
>          Issue Type: Bug
>    Affects Versions: 0.7.2
>            Reporter: Nitsan Seniak
>            Priority: Critical
>
> The following calls throws an exception:
> Mailbox add = AddressBuilder.DEFAULT.parseMailbox("joe@my company <joe.foo@company.com>");
> The exception is:
> org.apache.james.mime4j.field.address.ParseException: Atoms in domain names must be separated
by '.'
> The expected result is (Hamcrest syntax):
> Mailbox add = AddressBuilder.DEFAULT.parseMailbox("joe@my company <joe.foo@company.com>");
> assertThat(add.getAddress(), is("joe.foo@company.com"));
> assertThat(add.getLocalPart(), is("joe@my company"));



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Mime
View raw message