Socket connection has timed out when C# program connect to office 365

Infra Combuilder 0 Reputation points
2023-03-30T13:27:42.8166667+00:00

I try to connect to office 365 email by using MailBee library with client Id and client secret. One of my email can login. But another email suddenly fail. I face following error.

Socket connection has timed out. InnerException message follows: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond

What do I need to configure at azure portal? Could you help me?

Developer technologies C#
{count} votes

1 answer

Sort by: Most helpful
  1. Rajeesh M R 226 Reputation points
    2023-03-30T13:41:43.5866667+00:00

    @Infra Combuilder MailBee uses smtp port 465 instead of 587. Just check that one in your C# code.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.