<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE section PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
<!ENTITY % BOOK_ENTITIES SYSTEM "../../Reference_Guide.ent">
%BOOK_ENTITIES;
]>
<section id="sect-Reference_Guide-EMail_Service_Configuration">
  <title>E-Mail Service Configuration</title>

  <section id="sect-Reference_Guide-EMail_Service_Configuration-Overview">
    <title>Overview</title>

    <para>&PRODUCT; includes an e-mail sending service that needs to be configured
    before it can function properly. This service, for instance, is used to send e-mails to users who forgot
    their password or username.</para>

  </section>

  <section id="sect-Reference_Guide-EMail_Service_Configuration-Parameters">
    <title>Configuring the outgoing e-mail account</title>

    <para>The e-mail service can use any SMTP account configured in
    $JBOSS_HOME/server/default/conf/gatein/configuration.properties
    (or $TOMCAT_HOME/gatein/conf/configuration.properties if you are using Tomcat).</para>

    <para>The relevant section looks like:</para>
    
    <programlisting># EMail
gatein.email.smtp.username=
gatein.email.smtp.password=
gatein.email.smtp.host=smtp.gmail.com
gatein.email.smtp.port=465
gatein.email.smtp.starttls.enable=true
gatein.email.smtp.auth=true
gatein.email.smtp.socketFactory.port=465
gatein.email.smtp.socketFactory.class=javax.net.ssl.SSLSocketFactory</programlisting>

    <para>It is preconfigured for GMail, so that any GMail account can easily be used (simply use the full GMail address
    as username, and fill-in the password.</para>

    <para>In corporate environments you will want to use your corporate SMTP gateway. When using it over SSL,
       like in default configuration, you may need to configure a certificate truststore, containing your SMTP server's
       public certificate. Depending on the key sizes, you may then also need to install Java Cryptography Extension (JCE) 
       Unlimited Strength Jurisdiction Policy Files for your Java Runtime Environment.</para>
  </section>
</section>
