5 Replies Latest reply on Nov 11, 2008 3:47 AM by Manoj Agrawal

    Email Configuration Help

    Robert Diaz Newbie

      Hi guys,
      I've been messing around with the email in Seam for a few days now, and I still don't get exactly what to do. I'm using jBoss AS 4.2.1 and Seam 2.0.1.SP1, and I know that there is some simple way to set up the email using the built in SMTP server in jBoss AS, I just don't know how to set it up.


      What I'm trying to do is have a I lost my password service that sends the user an automatically generated password. I have all of the logic down and theoretically, it should work, but I just haven't gotten the emailing functionality to work.


      Any help is much appreciated.


      Thanks,
      Robert

        • 1. Re: Email Configuration Help
          Todd Nash Newbie

          I am assuming that you are referring to the email functionality in Seam provided by meldware. If so, here is an example from my components.xml file that works for us. We use this to provide the user with a lost password email, etc.:


          This example uses the godaddy smtp server which does NOT use SSL. I have been successful getting this to work with google using ssl. You have to make sure the host and port are correct.






             <mail:mail-session host="smtpout.secureserver.net" ssl="false" port="80" username="yourusername" password="yourpassword"/>
              <mail:meldware>
                  <mail:users>
                      <value>#{dev}</value>
                      <value>#{test}</value>
                  </mail:users>
              </mail:meldware>
          
              <mail:meldware-user name="dev" username="devuser" password="devpassword"/>
              <mail:meldware-user name="test" username="testuser" password="testpassword"/>
          
              <mail:aliases>
                  <value>devuser@yourdomain.com</value>
                  <value>testuser@yourdomain.com</value>
              </mail:aliases>
              <mail:meldware-user name="root" username="root" password="root" administrator="true" />





          If you problem lies with the jsf page, let me know I can provide a sample of that too.

          • 2. Re: Email Configuration Help
            Robert Diaz Newbie

            I thought that Seam's email could be done multiple ways. One was through meldware and there was another that uses the jBoss AS builtin SMTP server. I would just use meldware, but I can't get it to install properly. It keeps on throwing an error that is in a blank window, so I can't tell what it's supposed to say.


            I know its not on the page itself. The page is very simple and I get stack traces in the server that talk about the emailing service. I'm not sure if the stack traces would help, so if it will, I'll post them.

            • 3. Re: Email Configuration Help
              Pete Muir Master

              JBoss AS doesn't have an SMTP server. Just point it at a real SMTP server as Todd has done.

              • 4. Re: Email Configuration Help
                Robert Diaz Newbie

                Oh. That makes a lot more sense. Thanks.

                • 5. Re: Email Configuration Help
                  Manoj Agrawal Newbie

                  Hi,
                  I have been struggling to get the email functionality working with jboss  and seam.
                  Does it matter if the deployment is war project or an ear project. I have seam mail example working as ear deployment but when I created a seam-gen war project and copied the example files I got following error.



                  org.jboss.seam.InstantiationException: Could not instantiate Seam component: org.jboss.seam.ui.facelet.facesContextFactory
                       at org.jboss.seam.Component.newInstance(Component.java:2049)
                       at org.jboss.seam.Component.getInstance(Component.java:1931)
                       at org.jboss.seam.Component.getInstance(Component.java:1910)
                       at org.jboss.seam.Component.getInstance(Component.java:1887)
                       at org.jboss.seam.Component.getInstance(Component.java:1882)
                       at org.jboss.seam.ui.facelet.RendererFacesContextFactory.instance(RendererFacesContextFactory.java:72)
                       at org.jboss.seam.ui.facelet.RendererRequest.init(RendererRequest.java:52)
                       at org.jboss.seam.ui.facelet.RendererRequest.run(RendererRequest.java:81)
                       at org.jboss.seam.ui.facelet.FaceletsRenderer.render(FaceletsRenderer.java:43)
                       at com.war.action.MailExample.send(MailExample.java:40)





                  Please let me know if I am missing any configuration.
                  Thanks