What caused the Socket Exception while sending email from Console application?

前端 未结 5 2089
走了就别回头了
走了就别回头了 2021-01-17 17:41

I\'m trying to write a basic console app that will send an email. The problem is that I keep getting the Socket exception:

An attempt was made to acc

5条回答
  •  萌比男神i
    2021-01-17 18:26

    Either don't assign the port or don't use EnableSSL = true. Doing one of this will solve your problem.

    You are trying to initiate a communication which is not allowed to be done this way.

提交回复
热议问题