Announcement

Collapse
No announcement yet.

Email Sender - multiple TO addresses throws error

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Email Sender - multiple TO addresses throws error

    Hi,

    Using the EmailSender connector to send emails.. To address field is extracted from XML of incoming message.

    <Email To="[email protected] ; [email protected]d" ..... />

    It is not liking the semicolons. I have tried adjusting the white space around them and even using , instead. But still unable to send to multiple addresses.

    Is this a bug or am i doing something wrong? Thanks. (the To address field in the connector UI is just one text field. So if the ; is correct, it is not currently possible, or ; is not the right way of doing it.)

    ERROR-402: SMTP connector error
    ERROR MESSAGE: Error sending email
    org.mule.umo.transformer.TransformerException: Illegal semicolon, not in group (javax.mail.internet.AddressException)
    at com.webreach.mirth.connectors.email.transformers.M essageObjectToEmailMessage.transform(MessageObject ToEmailMessage.java:168)
    at org.mule.transformers.AbstractEventAwareTransforme r.doTransform(AbstractEventAwareTransformer.java:4 8)
    at org.mule.transformers.AbstractTransformer.transfor m(AbstractTransformer.java:197)
    at com.webreach.mirth.connectors.email.SmtpMessageDis patcher.doDispatch(SmtpMessageDispatcher.java:106)
    at com.webreach.mirth.connectors.email.SmtpMessageDis patcher.doSend(SmtpMessageDispatcher.java:146)
    at org.mule.providers.AbstractMessageDispatcher.send( AbstractMessageDispatcher.java:167)
    at org.mule.impl.MuleSession.sendEvent(MuleSession.ja va:191)
    at org.mule.impl.MuleSession.sendEvent(MuleSession.ja va:130)
    at org.mule.routing.outbound.AbstractOutboundRouter.s end(AbstractOutboundRouter.java:85)
    at org.mule.routing.outbound.FilteringMulticastingRou ter.route(FilteringMulticastingRouter.java:45)
    at org.mule.routing.outbound.OutboundMessageRouter$1. doInTransaction(OutboundMessageRouter.java:78)
    at org.mule.transaction.TransactionTemplate.execute(T ransactionTemplate.java:48)
    at org.mule.routing.outbound.OutboundMessageRouter.ro ute(OutboundMessageRouter.java:82)
    at org.mule.impl.model.DefaultMuleProxy.run(DefaultMu leProxy.java:395)
    at org.mule.impl.work.WorkerContext.run(WorkerContext .java:290)
    at edu.emory.mathcs.backport.java.util.concurrent.Thr eadPoolExecutor$Worker.runTask(ThreadPoolExecutor. java:650)
    at edu.emory.mathcs.backport.java.util.concurrent.Thr eadPoolExecutor$Worker.run(ThreadPoolExecutor.java :675)
    at java.lang.Thread.run(Unknown Source)
    Caused by: javax.mail.internet.AddressException: Illegal semicolon, not in group in string ``[email protected] ; [email protected]d'' at position 24
    at javax.mail.internet.InternetAddress.parse(Internet Address.java:780)
    at javax.mail.internet.InternetAddress.parse(Internet Address.java:555)
    at com.webreach.mirth.connectors.email.MailUtils.Stri ngToInternetAddresses(MailUtils.java:132)
    at com.webreach.mirth.connectors.email.transformers.M essageObjectToEmailMessage.transform(MessageObject ToEmailMessage.java:135)
    ... 17 more
    Last edited by john.newman; 03-05-2010, 01:35 PM.

  • #2
    Hello,
    When I need to set multiple recipients, I set the entries with commas.

    HTH,

    JJ mouris
    JJ Mouris
    FFE Luxembourg
    IT-Department

    Comment


    • #3
      I just use commas to separate the addresses on the To-list, and they always work.
      The commas get translated into semi-colons on the email however.

      -Deepa
      ochin.org

      Comment


      • #4
        hmm i'm pretty sure i tried that and it didnt work.. but maybe not, I will try again and report back. :fingers crossed:

        thanks guys

        Comment


        • #5
          Hey John - did it work?

          Comment


          • #6
            Commas work for me as well
            Last edited by rts; 04-23-2010, 10:47 AM.

            Comment


            • #7
              commas appear to be working

              [email protected] , [email protected]

              works.. not sure what's so bad about semicolons, as that's what is normally used

              Comment


              • #8
                Just to provide some rationale for why it is that way: we use the JavaMail API for the the Email Sender, and the InternetAddress class that is used parses addresses based on comma:

                http://java.sun.com/products/javamai...va.lang.String)
                Gerald Bortis | Chief Information Officer | Mirth Corporation

                Comment

                Working...
                X