How to send mail using SMTP server office365?
I've tried sending using Host smtp.office365.com, Port 587, SSL and User Name/Password. I get the error "Unrecognized SSL message, plaintext connection"
I solved the problem. The trick was to change to TLS.
I am having the same error. Changing it to TLS generate the following error :
Error occurred connecting to e-mail server: Connect failed; Caused by: Connect failed; Caused by: Unexpected response: 220 SG2PR06CA0152.outlook.office365.com Microsoft ESMTP MAIL Service
Check the admin page in O365 under Admin Portal>Mail>Accounts>Pop and IMAP.
From there you will find the different methods you can try POP/IMAP/SMTP. Usually the error stack might give you an indication where you need to lean on. In my case, the error stack was:
Caused by: java.io.IOException: Unexpected response: 220 DM5PR17CA0059.outlook.office365.com Microsoft ESMTP MAIL Service ready at Mon, 25 Jun 2018 17:10:31 +0000 at com.sun.mail.pop3.Protocol.readResponse(Protocol.java:749)
From there, i tried POP and it worked.
I'm having error when trying to use outlook Error occurred connecting to e-mail server: 535 5.7.3 Authentication unsuccessful [PS1PR0601CA0102.apcprd06.prod.outlook.com] ; Caused by: 535 5.7.3 Authentication unsuccessful [PS1PR0601CA0102.apcprd06.prod.outlook.com]Any suggestions on this please?
Retrieving data ...