OAuth not working in Endpoint

OAuth not working in Endpoint

I have both EC and Service Desk Plus on a server. They communicate fine between them. I have OAuth set up correctly on SDP and everything works fine. Using the same client ID, Authorization & Token URL and Scope, I set up OAuth on EC, it asks me for the correct username to log in with, but then I get a message saying "Cannot connect to mail server, verify the port number."  Port 587 is open, and my SDP instance on the same server connects via OAuth just fine. Any idea why it's telling me this?

                New to ADSelfService Plus?