Version 4

    WARNING: This feature is now documented in GateIn reference guide where are latest informations. This wiki page is no longer maintained and may have outdated info.


    It maybe useful for portal administrator to be notified when some new user register himself into portal. Especially if portal provides public registration page. So if you are administrator of GateIn portal or EPP5.*, then this article is for you.


    Please note that this feature is not provided in GateIn or EPP 5.* out of the box. So if you want this feature, you will need to download and install portal extension (something like plugin) and configure it for correct work in your portal.


    You will need to do these steps:


    1) Checkout sources of portal registration extension and build it - You can checkout project sources from SVN and build project with maven. This project contains some necessary subprojects with classes and configurations needed for functionality of sending mails after registration of new user.

    SVN location of project is . After checkout, you can build project by command mvn clean install (Recommended version of Maven is 2.2.1 or later)


    2) Deploy extension EAR - After successful build, you will need to copy EAR directory to your GateIn portal. So copy directory registration-extension-ear/target/registration-extension.ear into your portal into $GATEIN_HOME/server/default/deploy directory.


    3) Change webui.configuration parameter in RegisterPortlet - You will need to do one necessary change in configuration of your GateIn portal. You need to go into WAR archiv $GATEIN_HOME/server/default/deploy/gatein.ear/exoadmin.war and open file WEB-INF/portlet.xml inside this archiv. Here you will need to find configuration of RegistrationPortlet and change value of webui.configuration parameter . So you will need to change (or comment) value /WEB-INF/conf/portlet/exoadmin/RegisterPortlet/webui/configuration.xml and replace it with value classpath:portlet/exoadmin/RegisterPortlet/webui/configuration.xml . So your configuration needs to look like this:


          <description xml:lang="EN">Register Portlet</description>
          <display-name xml:lang="EN">Register Portlet</display-name>


    4) Configure service for sending mails - There is new component called PostRegistrationService in extension archive, which you build in step 1. This component can be configured inside file $GATEIN_HOME/server/default/deploy/registration-extension.ear/registration-extension-war.war/WEB-INF/conf/configuration.xml . Default configuration looks like this:


            <description>Parameter can be used to indicate whether administrator want to be notified about registration of new user.</description>
            <description>This will be used as "from" header in admin mail</description>
            <description>This should be admin mail address, where email about registration of new user will be send.</description>
            <description>Subject of mail. Tokens like ${user.userName} will be replaced with real attributes of registered user in final message.     </description>
            <value>Registration of user ${user.userName}</value>
            <description>Content of mail. Tokens like ${user.userName} will be replaced with real attributes of registered user in final message.</description>
            <value>Hi admin,
    User ${user.userName} just register himself into your portal. Full data about user:
    Username: ${user.userName}
    First name: ${user.firstName}
    Last name: ${user.lastName}
    E-mail: ${}
    This message has been generated automatically as notification about registration of new user into portal.


    Here is description of parameters:


    sendMailAfterRegistration - if you want to disable feature of sending mails after registration of new user, you can change this parameter to false. This way, you will be able to disable feature of sending mails without need to undeploy this extension.


    mailFrom , mailTo , mailSubject, mailMessage - Parameters and format of E-mail message to receive. More detailed information is in decription of each attribute


    5) Configure your SMTP server configuration - You will also need to configure correctly your SMTP server configuration. This can be done in file $GATEIN_HOME/server/default/conf/gatein/ where are some properties in section EMail. For example your properties can look similar to this:


    # EMail



    Detailed documentation about email configuration is here .


    6) That's all !!! - Now restart your GateIn portal and try to register new user from page http://localhost:8080/portal/public/classic/register . You should receive email to specified address (from step 4) directly after successful registration of this user.