0

We have our custom email syncup module where we use the IMAP and SMTP given by user to connect to exchange server. We see a delay while trying to connect to smtp.office365.com. It takes upto 2 mins to connect to the smtp server. The time taken between "Trying to connect to smtp.office365.com" and the message which says connected to server is around 2 minutes. Any help to solve this is appreciated. Note: We have been connecting to other SMTP hosts as well but havent come across this issue. Happens only with office365 SMTP.

  • Does it take 2 minutes to [telnet to the SMTP server](https://javaee.github.io/javamail/FAQ#condebug)? Is [localhost lookup](https://stackoverflow.com/questions/44435457/mimemessage-savechanges-is-really-slow/44438011#44438011) of the JavaMail machine broken? – jmehrens Aug 24 '20 at 21:22
  • when i do telnet its faster. only from application it takes time. The app is deployed in wildfly server. – Ganga Lakshmanasamy Aug 25 '20 at 07:31
  • Follow the steps in the above to fix [localhost lookup](https://stackoverflow.com/questions/44435457/mimemessage-savechanges-is-really-slow/44438011#44438011) by adding additional mail session properties. – jmehrens Aug 25 '20 at 13:21

0 Answers0