Skip to main content

Configure the email sending module

You're reading Identity & Access Management 7.0.0. The newest release is 7.3.0, and Cloud has the newest features. Go to the newest release

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

Configure the email sender (globally)​

Follow the steps given below to enable the email sender globally for all tenants in your WSO2 IS.

  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"
    PropertyDescription
    from_addressThis is the mail address from where you want to send the notification. It can be any working mail address.
    usernameProvide the username of the SMTP account.
    Username of the mail you have provided in from_address.
    passwordProvide the password of the SMTP account.
    Password of the mail you have provided in from_address.
    hostThe SMTP server to connect to.
    portThis is the SMTP server port to connect to if the connect() method does not explicitly specify one. Defaults to 25.
    enable_start_tlsIf true, this enables using the STARTTLS command (if enabled before issuing any login commands. Note that an appropriate trust store must be configured so that the client will trust the server's certificate. Defaults to true.
    enable_authenticationIf true, attempt to authenticate the user using the AUTH command. Defaults to true.
    signature

    Specifies the display name for the "From" email address. For example, "ABC Company" results in `"ABC Company"

    <[email protected]>`.

    If you don't set this property, the display name becomes null and the system falls back to your SMTP server settings. For example, some servers use the username as the display name.

    To send an email with no display name and show only the email address, set this value to an empty string: signature = ""

    tip

    For information about the SMTP, see here.

    info
    • If you use a Gmail account as the from_address, you must create an App Password. After you get an App Password from Google, update the password.
    • If your password contains special characters (example: <, >, &), you will run into errors when running the server. To avoid errors, update the password parameter as follows:
      password= "<![CDATA[xxxx]]>"
  3. Save the configurations and start the server.

Was this page helpful?