Hi all !
After all the configuration and getting the token for office365, I'm getting an error while trying to fetch the emails.
The token is correct and works:

When configuring the mail fetching, I get errors.
Without tls:// on the hostname field, I get authentication failed .
with tls:// on the hostname field, I get 504 gateway time out.

I know i need tls on the hostname field, but don't know why I'm getting timeout.
The server can reach the office365.
Here's the telnet session:

And using 993

Why can't osticket ?
Best regards