2 Replies Latest reply on Jun 8, 2009 5:40 PM by oneworld95

    How do you send emails from Seam?

    oneworld95
      Hi. Our sys admin has configured email on the Unix server at the SMTP level to allow the test machine to send emails. Now what do I need to do in Eclipse/Seam to get emails sent? I've created a mail.xhtml file with the <m:message> tag. Do I need to include any JAR files in my Seam project to enable emails?

      The JNDI name of the mail service is "java:/Mail". Does this need to be in any configuration files? Thanks.
        • 1. Re: How do you send emails from Seam?
          lvdberg

          Yes, you need to cnfigure it in components.xml. You're using the email from jBoss, so you don't need to add mail.jar (already in jboss-lib). However, you need to add jboss-seam-mail.jar and depending on what you're going to do extra (things like sending attached PDF) you need to add other jars. Chapter 21 of the seam documentation explains this.


          In components:


          <mail:mail-session startup="true" session-jndi-name="java:/Mail"  />



          • 2. Re: How do you send emails from Seam?
            oneworld95

            Thanks, Leo. That's what I needed :)