Configure the email sending module¶
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.
- Shut down the server if it is running.
-
Add the following properties to the
deployment.tomlfile in the<IS_HOME>/repository/conffolder 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"Property Description 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 STARTTLScommand (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 totrue.enable_authenticationIf true, attempt to authenticate the user using the AUTH command. Defaults to true.signatureSpecifies 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 becomesnulland the system falls back to your SMTP server settings. For example, some servers use theusernameas 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 thepasswordparameter as follows:
- 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
-
Save the configurations and start the server.