Getting SmtpClient to work with a self signed SSL certificate

前端 未结 3 998
别跟我提以往
别跟我提以往 2021-01-17 13:58

I\'m attempting to use the System.Net.Mail.SmtpClient class to relay an email through my company\'s email server. All SMTP connections to the mail server have to be SSL and

3条回答
  •  误落风尘
    2021-01-17 14:27

    My issue ended up being that the .Net SmtpClient class apparently doesn't support the use of port 465 for SMTP SSL connections. Using port 25 with a self signed SSL certificate worked correctly.

    MSDN System.Net forum question Can SmtpClient be configured to work with a self signed certificate?.

提交回复
热议问题