0

The method to send an email is running normally but sometimes it shows this message: Authentication failed because the remote party has closed the transport stream.

It usually occurs when another method which works with a X509Certificates certificate is used... the configurations of the email provider are ok.

Can someone help me?

Thanks

Gherbi Hicham
  • 2,416
  • 4
  • 26
  • 41
Everton
  • 11
  • 1
  • 1

1 Answers1

0

I solved this issue yesterday using the code below:

ServicePointManager.SecurityProtocol = SecurityProtocolType.Ssl3 | SecurityProtocolType.Tls;

This code I found here Default SecurityProtocol in .NET 4.5

I believe that the problem is the framework version, my program is using the 3.5 version...

Thanks

Community
  • 1
  • 1
Everton
  • 11
  • 1
  • 1