[ 
https://issues.apache.org/activemq/browse/CAMEL-3199?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=62376#action_62376
 ] 

Karthz edited comment on CAMEL-3199 at 10/6/10 2:18 PM:
--------------------------------------------------------

In MailBinding.java, in the method appendRecipientToMimeMessage(), 

{code} 
replace this line

        String[] lines = recipient.split("[,;]");

with 

        String[] lines = recipient.split("[,;](?=([^\"]*\"[^\"]*\")*[^\"]*$)");
{code} 


The regex just does a lookahead to see if every quote has its matching quote 
till the end.

      was (Author: karthz):
    In MailBinding.java, in the method appendRecipientToMimeMessage(), replace 
this line

        String[] lines = recipient.split("[,;]");

with 

        String[] lines = recipient.split("[,;](?=([^\"]*\"[^\"]*\")*[^\"]*$)");


The regex just does a lookahead to see if every quote has its matching quote 
till the end.
  
> Allow : and , inside quoted names for addresses
> -----------------------------------------------
>
>                 Key: CAMEL-3199
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-3199
>             Project: Apache Camel
>          Issue Type: Bug
>          Components: camel-mail
>    Affects Versions: 2.4.0
>            Reporter: Tracy Snell
>            Assignee: Tracy Snell
>            Priority: Minor
>             Fix For: 2.5.0
>
>         Attachments: camel-mail-patch.txt
>
>
> "Snell, Tracy" <t...@juicelabs.com> breaks with the current address parsing.

-- 
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