Email Configuration for Dspace
$ sudo service tomcat stop
$ sudo nano /dspace/config/dspace.cfg
---------------------------
mail.server = smtp.gmail.com
mail.server.username =nijwm@gmail.com
mail.server.password =XXXXXX
mail.server.port = 587
mail.from.address = nijwmbasu@gmail.com
feedback.recipient = nijwmbasumatary763@gmail.com
mail.admin = nijwmbasu@gmail.com
alert.recipient = ${nijwmbasu@gmail.com}
mail.charset = UTF-8
mail.allowed.referrers = ${dspace.hostname}
# Pass extra settings to the Java mail library. Comma-separated, equals sign between
# the key and the value. For example:
mail.extraproperties = mail.smtp.socketFactory.port=587, \
mail.smtp.starttls.enable=true, \
mail.smtp.starttls.required=true, \
mail.smtp.ssl.protocols=TLSv1.2
------------------------------------------
$ sudo service tomcat start
If incase the problem still exist. Try the gmail seetings
Allow access to your gmail account less secure apps:
https://www.google.com/settings/security/lesssecureapps
If incase the problem still exist. Try the gmail seetings
$ sudo apt install crypto-policies
$ sudo update-crypto-policies --set LEGACY
Reboot your system and check if it works