2 Replies Latest reply on Nov 2, 2009 8:52 PM by oyesiji77

    Sending Emails

    oyesiji77

      I noticed that whenever my application server fails to contact my Mail Server, my application always fails. So i embedded the sending mail part within a try and catch
      but this does not help. Please can someone suggest a solution. I don't want the application to fail if sending mail fails






           @Asynchronous public void sendWelcomeMail(){
                try{
                renderer.render("/email/newUserMail.xhtml");
                }catch(Exception e){
                     log.info("Exception Sending mail");
                     //TODO Save Email
                }
           }



        • 1. Re: Sending Emails
          kapitanpetko

          UIMessage (the <m:message> component) throws a FacesException which might be swallowed by JSF. Set a breakpoint in UIMessage.encodeEnd
          to see what exactly happens. If you want to save the message, you might need to install your own Transport. Or just give up Seam mail and
          use JavaMail directly.


          • 2. Re: Sending Emails
            oyesiji77

            Yes thats what i am planning to do now, Give up seam mail and use Spring instead (Shame though was planning on using just seam for this application)