<?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>Email 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 emails 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
   with username and password.</para>

    <para>In corporate environments, if you want to use your corporate SMTP gateway over SSL,
       like in the default configuration, 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>
