Apache Geronimo comes with its own JavaMail implementation. It makes a global mail session available to users, at the JNDI location ger:/MailSession
. By default, the server provides support for email through the SMTP protocol. Other protocols, such as POP3 and IMAP, are also supported with a bit of configuration. The configuration of the default global mail session is shown below:
<gbean name="mail/MailSession" class="org.apache.geronimo.mail.MailGBean"> <attribute name="transportProtocol">smtp</attribute> <attribute name="jndiName">ger:/MailSession</attribute> <reference name="Protocols"/> </gbean> <gbean name="SMTPTransport" class="org.apache.geronimo.mail.SMTPTransportGBean"> <attribute name="host">localhost</attribute> <attribute name="port">25</attribute> </gbean>
These attribute values can be overridden in the config.xml
and config-substitutions.properties
files. The entry in config.xml
is shown...