4 Replies Latest reply on Nov 11, 2012 8:16 AM by Y D Prakash

    Emailer does not allow if from/to address has non-ascii characters

    Y D Prakash Newbie

      Hi,

       

      I am not able to send the email using AS7 mailer if the from/to address has utf-8 characters. Please help..

        • 1. Re: Emailer does not allow if from/to address has non-ascii characters
          jaikiran pai Master

          What's the problem are you running into and what exception stacktraces are you seeing? Which exact version of AS7 and what do your configurations look like?

          • 2. Re: Emailer does not allow if from/to address has non-ascii characters
            Y D Prakash Newbie

            Jaikiran,

             

            Does AS7 support RFC 5322?

             

            I am getting following statck trace:

             

            16:14:05,448 ERROR [stderr] (http--0.0.0.0-8080-4) javax.mail.internet.AddressException: Local address contains control or whitespace in string ``鏈夊洓@mydomain.com''

            16:14:05,464 ERROR [stderr] (http--0.0.0.0-8080-4)           at javax.mail.internet.InternetAddress.checkAddress(InternetAddress.java:1213)

            16:14:05,464 ERROR [stderr] (http--0.0.0.0-8080-4)           at javax.mail.internet.InternetAddress.parse(InternetAddress.java:1091)

            16:14:05,464 ERROR [stderr] (http--0.0.0.0-8080-4)           at javax.mail.internet.InternetAddress.parse(InternetAddress.java:633)

            16:14:05,464 ERROR [stderr] (http--0.0.0.0-8080-4)           at javax.mail.internet.InternetAddress.<init>(InternetAddress.java:111)

            16:14:05,464 ERROR [stderr] (http--0.0.0.0-8080-4)           at com.app.mailutility.Emailer.send(Emailer.java:124)

            16:14:05,464 ERROR [stderr] (http--0.0.0.0-8080-4)           at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

            16:14:05,479 ERROR [stderr] (http--0.0.0.0-8080-4)           at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

            16:14:05,479 ERROR [stderr] (http--0.0.0.0-8080-4)           at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

            16:14:05,479 ERROR [stderr] (http--0.0.0.0-8080-4)           at java.lang.reflect.Method.invoke(Unknown Source)

            16:14:05,479 ERROR [stderr] (http--0.0.0.0-8080-4)           at org.jboss.ws.common.invocation.AbstractInvocationHandlerJSE.invoke(AbstractInvocationHandlerJSE.java:111)

            16:14:05,479 ERROR [stderr] (http--0.0.0.0-8080-4)           at org.jboss.wsf.stack.cxf.JBossWSInvoker._invokeInternal(JBossWSInvoker.java:181)

            16:14:05,479 ERROR [stderr] (http--0.0.0.0-8080-4)           at org.jboss.wsf.stack.cxf.JBossWSInvoker.invoke(JBossWSInvoker.java:127)

            16:14:05,479 ERROR [stderr] (http--0.0.0.0-8080-4)           at org.apache.cxf.interceptor.ServiceInvokerInterceptor$1.run(ServiceInvokerInterceptor.java:58)

            16:14:05,479 ERROR [stderr] (http--0.0.0.0-8080-4)           at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)

            16:14:05,479 ERROR [stderr] (http--0.0.0.0-8080-4)           at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)

            16:14:05,479 ERROR [stderr] (http--0.0.0.0-8080-4)           at java.util.concurrent.FutureTask.run(Unknown Source)

            16:14:05,479 ERROR [stderr] (http--0.0.0.0-8080-4)           at org.apache.cxf.workqueue.SynchronousExecutor.execute(SynchronousExecutor.java:37)

            16:14:05,495 ERROR [stderr] (http--0.0.0.0-8080-4)           at org.apache.cxf.interceptor.ServiceInvokerInterceptor.handleMessage(ServiceInvokerInterceptor.java:106)

            16:14:05,495 ERROR [stderr] (http--0.0.0.0-8080-4)           at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:263)

            16:14:05,495 ERROR [stderr] (http--0.0.0.0-8080-4)           at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121)

            16:14:05,495 ERROR [stderr] (http--0.0.0.0-8080-4)           at org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:207)

            16:14:05,495 ERROR [stderr] (http--0.0.0.0-8080-4)           at org.jboss.wsf.stack.cxf.RequestHandlerImpl.handleHttpRequest(RequestHandlerImpl.java:91)

            16:14:05,495 ERROR [stderr] (http--0.0.0.0-8080-4)           at org.jboss.wsf.stack.cxf.transport.ServletHelper.callRequestHandler(ServletHelper.java:169)

            16:14:05,495 ERROR [stderr] (http--0.0.0.0-8080-4)           at org.jboss.wsf.stack.cxf.CXFServletExt.invoke(CXFServletExt.java:87)

            16:14:05,495 ERROR [stderr] (http--0.0.0.0-8080-4)           at org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:185)

            16:14:05,495 ERROR [stderr] (http--0.0.0.0-8080-4)           at org.apache.cxf.transport.servlet.AbstractHTTPServlet.doPost(AbstractHTTPServlet.java:108)

            16:14:05,495 ERROR [stderr] (http--0.0.0.0-8080-4)           at javax.servlet.http.HttpServlet.service(HttpServlet.java:754)

            16:14:05,511 ERROR [stderr] (http--0.0.0.0-8080-4)           at org.jboss.wsf.stack.cxf.CXFServletExt.service(CXFServletExt.java:135)

            16:14:05,511 ERROR [stderr] (http--0.0.0.0-8080-4)           at org.jboss.wsf.spi.deployment.WSFServlet.service(WSFServlet.java:140)

            16:14:05,511 ERROR [stderr] (http--0.0.0.0-8080-4)           at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)

            16:14:05,511 ERROR [stderr] (http--0.0.0.0-8080-4)           at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:329)

            16:14:05,511 ERROR [stderr] (http--0.0.0.0-8080-4)           at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248)

            16:14:05,511 ERROR [stderr] (http--0.0.0.0-8080-4)           at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275)

            16:14:05,511 ERROR [stderr] (http--0.0.0.0-8080-4)           at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161)

            16:14:05,511 ERROR [stderr] (http--0.0.0.0-8080-4)           at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:153)

            16:14:05,511 ERROR [stderr] (http--0.0.0.0-8080-4)           at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:155)

            16:14:05,511 ERROR [stderr] (http--0.0.0.0-8080-4)           at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)

            16:14:05,511 ERROR [stderr] (http--0.0.0.0-8080-4)           at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)

            16:14:05,526 ERROR [stderr] (http--0.0.0.0-8080-4)           at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:368)

            16:14:05,526 ERROR [stderr] (http--0.0.0.0-8080-4)           at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877)

            16:14:05,526 ERROR [stderr] (http--0.0.0.0-8080-4)           at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:671)

            16:14:05,526 ERROR [stderr] (http--0.0.0.0-8080-4)           at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:930)

            16:14:05,526 ERROR [stderr] (http--0.0.0.0-8080-4)           at java.lang.Thread.run(Unknown Source)

            • 3. Re: Emailer does not allow if from/to address has non-ascii characters
              Tomaz Cerar Master

              Hi,

               

              this is not so much jboss issue as is a potential undelying javaMail issue.

              but given the rfc you mention, relevant part:  http://tools.ietf.org/html/rfc5322#section-3.4.1

              your from address might not be correct.

               

              check http://stackoverflow.com/questions/4608554/javamail-problem-with-n-characters-in-mail-addresses for some solutions.

              in worst case scenario what you can  do is, not set from address in mail subsystem (as undelying javaMail might not like it) but set in code where you send your mail.

              aka set also from not just to.

               

              --

              tomaz

              • 4. Re: Emailer does not allow if from/to address has non-ascii characters
                Y D Prakash Newbie

                Would that mean email id can not have non-ASCII characters like Japanese/Chinese?  Thanks.