2 Replies Latest reply on Sep 4, 2008 10:08 PM by Pallavi Kodatham

    Email issue : non existent email id

    sandeep jindal Newbie
      Hi,

      I am using Seam email feature and am able to send the mails successfully. But i need to know if the mail has been delivered successfully or not. Like in cae of some non-existent email id (abc@ab.com .. here format of email id is valid, but is non-existent), i need to know to which recipents email sending did not succedded. How is it possible. Please help me out. I am using the seam email example..

      @In(create=true)
      private Renderer renderer;
        
      public void send() {
          try {
             renderer.render("/simple.xhtml");
             facesMessages.add("Email sent successfully");
         }
         catch (Exception e) {
             facesMessages.add("Email sending failed: " + e.getMessage());
         }
      }
        • 1. Re: Email issue : non existent email id
          Pete Muir Master

          You have to work within the limits of SMTP (which doesn't support this directly), so the only way is to process bounces messages from MTAs.

          • 2. Re: Email issue : non existent email id
            Pallavi Kodatham Newbie
            Hi sandeep,

            can you please send me the details of how you configured your smtp server.
            I am getting the exception below while rendering the page


            I am trying to send template- based email from my web application(which uses jboss seam).

            I am getting the following exception.

            Caused by: javax.faces.FacesException
            at org.jboss.seam.mail.ui.UIMessage.encodeEnd(UIMessage.java:146)
            at org.jboss.seam.ui.util.JSF.renderChild(JSF.java:181)
            at org.jboss.seam.ui.util.JSF.renderChildren(JSF.java:163)
            at org.jboss.seam.ui.facelet.FaceletsRenderer.renderFacelet(FaceletsRenderer.java:206)
            at org.jboss.seam.ui.facelet.FaceletsRenderer$1.process(FaceletsRenderer.java:160)
            at org.jboss.seam.ui.facelet.FaceletsRenderer$RenderingContext.run(FaceletsRenderer.java:78)
            at org.jboss.seam.ui.facelet.FaceletsRenderer.render(FaceletsRenderer.java:169)
            at com.reliant.vhet.ui.action.EmailAction.send(EmailAction.java:29)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
            at java.lang.reflect.Method.invoke(Method.java:585)
            at org.jboss.seam.util.Reflections.invoke(Reflections.java:21)
            at org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationContext.java:31)
            at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:56)
            at org.jboss.seam.transaction.RollbackInterceptor.aroundInvoke(RollbackInterceptor.java:31)
            at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
            at org.jboss.seam.core.BijectionInterceptor.aroundInvoke(BijectionInterceptor.java:46)
            at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
            at org.jboss.seam.core.MethodContextInterceptor.aroundInvoke(MethodContextInterceptor.java:42)
            at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
            at org.jboss.seam.core.SynchronizationInterceptor.aroundInvoke(SynchronizationInterceptor.java:32)
            at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
            at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:106)
            at org.jboss.seam.intercept.JavaBeanInterceptor.interceptInvocation(JavaBeanInterceptor.java:155)
            at org.jboss.seam.intercept.JavaBeanInterceptor.invoke(JavaBeanInterceptor.java:91)
            at com.reliant.vhet.ui.action.EmailAction_$$_javassist_10.send(EmailAction_$$_javassist_10.java)
            at com.reliant.vhet.ui.action.OppTreeAction.calcPrice(OppTreeAction.java:851)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
            at java.lang.reflect.Method.invoke(Method.java:585)
            at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:112)
            at org.jboss.ejb3.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:166)
            at org.jboss.seam.intercept.EJBInvocationContext.proceed(EJBInvocationContext.java:44)
            at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:56)
            at org.jboss.seam.core.BijectionInterceptor.aroundInvoke(BijectionInterceptor.java:46)
            at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
            at org.jboss.seam.persistence.ManagedEntityIdentityInterceptor.aroundInvoke(ManagedEntityIdentityInterceptor.java:48)
            at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
            at org.jboss.seam.transaction.RollbackInterceptor.aroundInvoke(RollbackInterceptor.java:31)
            at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
            at org.jboss.seam.core.ConversationInterceptor.aroundInvoke(ConversationInterceptor.java:65)
            at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
            at org.jboss.seam.core.MethodContextInterceptor.aroundInvoke(MethodContextInterceptor.java:42)
            at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
            at org.jboss.seam.persistence.EntityManagerProxyInterceptor.aroundInvoke(EntityManagerProxyInterceptor.java:26)
            at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
            at org.jboss.seam.persistence.HibernateSessionProxyInterceptor.aroundInvoke(HibernateSessionProxyInterceptor.java:27)
            at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
            at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:106)
            at org.jboss.seam.intercept.SessionBeanInterceptor.aroundInvoke(SessionBeanInterceptor.java:50)
            at sun.reflect.GeneratedMethodAccessor1246.invoke(Unknown Source)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
            at java.lang.reflect.Method.invoke(Method.java:585)
            at org.jboss.ejb3.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:118)
            at org.jboss.ejb3.interceptor.EJB3InterceptorsInterceptor.invoke(EJB3InterceptorsInterceptor.java:63)
            at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
            at org.jboss.ejb3.entity.ExtendedPersistenceContextPropagationInterceptor.invoke(ExtendedPersistenceContextPropagationInter
            at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
            at org.jboss.ejb3.entity.TransactionScopedEntityManagerInterceptor.invoke(TransactionScopedEntityManagerInterceptor.java:54
            at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
            at org.jboss.ejb3.AllowedOperationsInterceptor.invoke(AllowedOperationsInterceptor.java:47)
            at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
            at org.jboss.aspects.tx.TxPolicy.invokeInCallerTx(TxPolicy.java:126)
            ... 94 more
            Caused by: javax.mail.AuthenticationFailedException
            at javax.mail.Service.connect(Service.java:306)
            at javax.mail.Service.connect(Service.java:156)
            at javax.mail.Service.connect(Service.java:105)
            at org.jboss.seam.mail.ui.UIMessage.encodeEnd(UIMessage.java:140)
            ... 158 more

            I wrote an email.xhtml to hold email message.
            and an emailAction which gets called on click of a button.

            but when i try to render this email.xhtml from emailAction...i am getting above exception.

            I am specifying company smtp in my components.xml
            <mail:mail-session host="exsmtp.reinternal.com" port="25" username="" password="" />

            This works fine when i try to send email using java smtp mail API eventhough i didnt give any credentials for above smtp server.

            But wondering why its giving authentication failed exception when try to do it using seam mail configuration.
            Any kind of help is much appreciated.

            Thanks,
            Pallavi.