Configuring GateIn to send e-mails

GateIn includes notification features that send e-mails to users when a specific action is performed on the portal, for instance the forgot password feature. There is another snippet to change in the configuration file to enable GateIn to send e-mails.

These are the usual properties required to configure an SMTP server in your local network.

Getting ready

Locate the configuration file as described in the previous recipe.

How to do it...

Carry out the following steps in order to configure GateIn to send e-mails:

  1. Locate in the e-mail section of the configuration file the following snippet:
    # 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
  2. Change the default configuration to allow GateIn, using your specific SMTP server settings for sending outgoing e-mails. As you can see, by default GateIn is configured to work on a Gmail account.

How it works...

GateIn can send outgoing e-mails using its internal MailService, which needs to be configured using the usual parameters for setting up an SMTP connection:

  • Username
  • Password
  • Host
  • Port
  • EnableTls
  • Auth
  • Socket factory port
  • Socket factory class

Username and password are the values that identify the e-mail account that you want to use in GateIn.

Host and port are used to set your SMTP server endpoint address.

EnableTls and Auth are used to set the needed authentication mechanism to process any operation.

Socket factory parameters are specifically used for instancing secure connections on your SMTP server. In this case, be sure to have correctly installed any security library needed to process the SSL specific request.

See also

  • The Configuring the content storage recipe
  • The Running GateIn on your machine recipe
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.145.169.109