[ 
https://issues.apache.org/activemq/browse/CAMEL-2067?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Claus Ibsen updated CAMEL-2067:
-------------------------------

           Patch Info:   (was: [Patch Available])
             Priority: Trivial  (was: Major)
    Affects Version/s: 2.0.0
        Fix Version/s: 2.1.0
                       1.6.2

trunk: 825760.
1.x: 825761.

Regarding the comma. We keep it as is. Nobody ever uses comma in their emails. 
In fact even not the pipe character.

> Mail Component: Character "|" in recipient addresses causes failure
> -------------------------------------------------------------------
>
>                 Key: CAMEL-2067
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-2067
>             Project: Apache Camel
>          Issue Type: Bug
>          Components: camel-mail
>    Affects Versions: 1.6.1, 2.0.0
>            Reporter: slad
>            Assignee: Claus Ibsen
>            Priority: Trivial
>             Fix For: 1.6.2, 2.1.0
>
>
> It looks like there is minor bug in regex used in MailBinding.java, it causes 
> "|" to act as delimiter, splitting email address into 2 parts.  
> For ex: Using email address as - first|l...@test.com causes it to split into 
> two parts:
> 1) first
> 2) l...@test.com
> "|" is acceptable character in email as per wikipedia 
> [http://en.wikipedia.org/wiki/Email_address]. I did not bother to read RFC 
> specification.
> Here is snippet of code causing issue:
>  private static void appendRecipientToMimeMessage(MimeMessage mimeMessage, 
> String type, String recipient)
>         throws MessagingException {
>         // we support that multi recipient can be given as a string seperated 
> by comma or semi colon
>         String[] lines = recipient.split("[,|;]");
>         for (String line : lines) {
> Regex above should either be "[,;]" or ";|,"
> Also, having email addresses separate out by , or ; seems to be issue as it 
> can be part of name. ex: "firstName, I like comma <first.l...@test.com>" is 
> valid. Above code will still cause failure for such messages. Can camel 
> support addresses as List/Array rather than comma delimited string?
> See Forum thread: 
> http://www.nabble.com/Camel-Mail-Component%3A-%22|%22-in-email-causes-message-to-fail-td25883099.html

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to