The Seam Framework provides support for sending emails via SMTP. To send emails, we need to perform the following three basic steps.
Configure the SMTP settings
Write the email template
Send the email
When using an application server such as the JBoss Application Server, I'm a big proponent of using the facilities provided by the application server. The JBoss Application Server provides a JNDI lookup to allow emails to be sent from within Java EE applications. Usually, you need to perform JNDI lookups to access this resource, but fortunately Seam provides a transparent way of sending emails without having to perform any JNDI lookups. We therefore have two configurations that we need to make before we can send emails with Seam applications. First we need to configure email within the application server itself, and second we need to configure our Seam application to use the application server's mail settings.
With the JBoss Application Server, configuring the...