Unable to send mail using Outlook in jira plugin

I am trying to send an attachment as mail using my outlook id through a Jira-plugin but getting this error :
javax.mail.MessagingException: Could not connect to SMTP host: smtp-mail.outlook.com, port: 587;
[INFO] [talledLocalContainer] nested exception is:
[INFO] [talledLocalContainer] javax.net.ssl.SSLException: Unsupported or unrecognized SSL message
[INFO] [talledLocalContainer] at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:2120)
[INFO] [talledLocalContainer] at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:712)
[INFO] [talledLocalContainer] at javax.mail.Service.connect(Service.java:388)
[INFO] [talledLocalContainer] at javax.mail.Service.connect(Service.java:246)

Hi, @ShubhangiMisra

with this amount of information it will be difficult to help, but it seems like you have a connection problem.
Can you try to set up the same SMTP server under the "Outgoing Mail"section in the admin panel?
There you will also have the possibility to test the connection “on the fly”.

My best guess is you’re trying a wrong port.

Good luck