web stats
Email Sender - multiple TO addresses throws error - Mirth Community

Go Back   Mirth Community > Mirth Connect > Support

Reply
 
Thread Tools Display Modes
  #1  
Old 03-05-2010, 02:33 PM
john.newman john.newman is offline
OBX.3 Kenobi
 
Join Date: Oct 2009
Posts: 124
john.newman is on a distinguished road
Default 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="invalid1@nospam.invalid ; invalid2@nospam.invalid" ..... />

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 ``invalid1@nospam.invalid ; invalid2@nospam.invalid'' 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 at 02:35 PM.
Reply With Quote
  #2  
Old 03-08-2010, 04:54 AM
mourisj mourisj is offline
Mirth Guru
 
Join Date: Feb 2007
Location: Luxembourg
Posts: 407
mourisj is an unknown quantity at this point
Default

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

HTH,

JJ mouris
__________________
JJ Mouris
FFE Luxembourg
IT-Department
Reply With Quote
  #3  
Old 03-08-2010, 10:10 AM
deepa deepa is offline
OBX.1 Kenobi
 
Join Date: Feb 2010
Posts: 39
deepa is on a distinguished road
Default

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
Reply With Quote
  #4  
Old 03-11-2010, 01:15 PM
john.newman john.newman is offline
OBX.3 Kenobi
 
Join Date: Oct 2009
Posts: 124
john.newman is on a distinguished road
Default

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
Reply With Quote
  #5  
Old 04-23-2010, 09:45 AM
ColinSJ ColinSJ is offline
OBX.1 Kenobi
 
Join Date: Apr 2009
Posts: 32
ColinSJ is on a distinguished road
Default

Hey John - did it work?
Reply With Quote
  #6  
Old 04-23-2010, 10:55 AM
rts rts is offline
Mirth Guru
 
Join Date: Feb 2008
Posts: 215
rts is an unknown quantity at this point
Default

Commas work for me as well

Last edited by rts; 04-23-2010 at 11:47 AM.
Reply With Quote
  #7  
Old 04-27-2010, 07:40 AM
john.newman john.newman is offline
OBX.3 Kenobi
 
Join Date: Oct 2009
Posts: 124
john.newman is on a distinguished road
Default

commas appear to be working

email1@site.com , email2@site2.com

works.. not sure what's so bad about semicolons, as that's what is normally used
Reply With Quote
  #8  
Old 04-27-2010, 10:00 AM
geraldb geraldb is offline
Mirth Employee
 
Join Date: Aug 2006
Location: Irvine, CA
Posts: 314
geraldb is an unknown quantity at this point
Default

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
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -8. The time now is 11:22 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2020, vBulletin Solutions, Inc.
Mirth Corporation