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.
Configure email sending¶
- 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= "firstname.lastname@example.org" username= "wso2iamtest" password= "Wso2@iam70" hostname= "smtp.gmail.com" port= 587 enable_start_tls= true enable_authentication= true signature = "ABC.com"
The mail address from where you want to send the notification. It can be any working mail address.
Provide the username of the SMTP account.
User name of the the mail you have provide in from_address
Provide the password of the SMTP account.
Password of the mail you have provided in from_address
The SMTP server to connect to.
The SMTP server port to connect to, if the connect() method does not explicitly specify one. Defaults to 25.
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.
If true, attempt to authenticate the user using the AUTH command. Defaults to false.
Signature of the sender account
For information about the SMTP, see here.
Re-start the server once configurations are in place.
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 disable 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 given below to enable your Google mail account to provide access to third-party applications.
- Navigate to https://myaccount.google.com/security.
- Click Security on the left menu and make sure that 2-step Verification under Signing in to Google is disabled or off.
- Enable Less secure app access.