SeamFramework.orgCommunity Documentation

Chapter 49. Configuration

49.1. Minimal Configuration

By default the configuration parameters for Seam Mail are handled via configuration read from your application's seam-beans.xml. This file is then parsed by Seam Solder to configure the MailConfig class. You can override this and provide your own configuration outside of Seam Mail but we will get into that later.

First lets add the relevant maven configuration to your pom.xml


Now now that is out of the way lets provide JavaMail with the details of your SMTP server so that it can connect and send your mail on it's way.

This configuration is handled via Seam Solder which reads in the configuration from your application's seam-beans.xml and configures the MailConfig class prior to injection.

<beans xmlns=""


That is all the configuration necessary to send a simple email message. Next we will take a look at how to configure and use the supported templating engines.


JBoss AS 7.0.x does not correctly load all the modules to support sending mail AS7-1375. This is easily fixed By replacing the module definition at $JBOSS_HOME/modules/javax/activation/api/main/module.xml with the following

<module xmlns="urn:jboss:module:1.0" name="javax.activation.api">
        <module name="javax.api" />
        <module name="javax.mail.api" >
            <imports><include path="META-INF"/></imports>
        <resource-root path="activation-1.1.1.jar"/>
        <!-- Insert resources here -->

This will be fixed in AS 7.1.x