Skip to content

Configuring the Email Sending Module

This document explains the steps to configure WSO2 Identity Server to send emails during multiple email related identity and access management tasks such as email OTP, email notifications, account recovery.

  1. Shut down the server if it is running.
  2. Add the following properties to the deployment.toml file in the IS_HOME/repository/conf folder to configure the email server.

    [output_adapter.email]
    from_address= "[email protected]"
    username= "wso2iamtest"
    password= "Wso2@iam70"
    hostname= "smtp.gmail.com"
    port= 587
    enable_start_tls= true
    enable_authentication= true
    signature = "ABC.com"
    from_address The mail address from where you want to send the notification. It can be any working mail address.
    username Provide the username of the SMTP account.
    User name of the the mail you have provide in from_address
    password Provide the password of the SMTP account.
    Password of the mail you have provided in from_address
    host The SMTP server to connect to.
    port The SMTP server port to connect to, if the connect() method does not explicitly specify one. Defaults to 25.
    enable_start_tls If true, enables the use of the STARTTLS` command (if supported by the before issuing any login commands. Note that an appropriate trust store must configured so that the client will trust theserver's certificate. Defaults to false.
    enable_authentication If true, attempt to authenticate the user using the AUTH command. Defaults to false.
    signature Signature of the sender account

    Tip

    For information about the SMTP, see here.

  3. Re-start the server once configurations are in place.

Note

If you are using a Google mail account, note that Google has restricted third-party apps and less secure apps from sending emails by default. Therefore, you need to configure your account to work around this restriction, as WSO2 Identity Server acts as a third-party application when sending emails to confirm user registrations or notification for password reset WSO2 Identity Server.

Follow the steps provided by Google to create an app specific password and use it for the SMTP configurations on the WSO2 Identity Server so that Google does not restrict the access.

Top