Skip to main content
Unlisted page
This page is unlisted. Search engines will not index it, and only users having a direct link can access it.

Configure the email sending module

You're reading Identity & Access Management 7.2.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]"
    auth_type= "BASIC"
    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.
    auth_typeAuthentication type to use when sending the email. Identity Server support BASIC and CLIENT_CREDENTIAL authentication types.
    For BASIC you need to configure username and password.
    For CLIENT_CREDENTIAL you need to configure client_id, client_secret, token_endpoint and scopes. Identity Server supports CLIENT_CREDENTIAL authentication with Microsoft 365 Exchange Online.
    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.
    client_idProvide 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.
    signatureSignature of the sender account.
    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.

Configure the email sender (per tenant)​

Follow the steps given below to enable the email sender per tenant.

  1. On the WSO2 Identity Server Console, go to Notification Channels > Email Provider.

  2. Provide the required details.

    Configure Email Provider
  3. Click Update.

  4. Since these configurations will be applicable during the tenant loading process, configure tenant loading and unloading for your tenant.

Was this page helpful?