# Seam Email

Welcome to the Seam Email example. This example demonstrates Seam's email templating.

You need to enter a name and email address to receive the example emails in the form below.

You can also send from inside a servlet:

Name |
Email Address |

## Help - it's not working!

- Setting an SMTP relay - If you have problems sending emails from this example you might have a firewall blocking outgoing email. You'll need to edit `<mail:mailSession>` in `resources/WEB-INF/components.xml` a `<mail:mailSession>`, set a SMTP relay to relay via and then run the `ant deploy` again.
- Servers other than JBoss AS - This example deploys GreenMail JBoss Service (from www.icegreen.com/greenmail/ - `greenmail-jboss-service.sar`) to act as an SMTP server (it listens for authenticated connections on `localhost:3025`). This means the mail example will work out of the box on JBoss AS. If you using another server you may need to set an SMTP relay as described above.
- GreenMail will fail if you have another service using port 3025 (you'll get a errors when the applicaiton is deployed). To get around this you can set a SMTP gateway as described above.