Is MFA required for this account? If so, that is expected.
Authentication failed because the remote party has closed the transport stream
I have application auto daily send email using smtpclient, it's still running OK before 1-Oct-2021. But from 1-Oct-2021, it send missing email, i use try catch to debug this and get exception below:
Please, give me a solution other than having to set up TLS1.2 in the application.
Thanks!
8 answers
Sort by: Oldest
-
-
AgaveJoe 26,136 Reputation points
2021-10-12T16:55:58.7+00:00 According to the MS 365 docs, deprecation of TLS 1.0 and 1.1 started in 2020. Also, according to the docs you can sent unencrypted SMTP which is not recommended though. The best approach is upgrading your systems/software to TLS 1.2.
-
KillboyPowerhead 1 Reputation point
2021-10-13T08:56:00.637+00:00 Same problem here.
Mail sending worked flawlessy unitl 1st oct. 2021 using SmtpClient in our applications targeting Framework 4.0. Unfortunately in the last days many of our customers using Office365 reported "Authentication failed because the remote party has closed the transport stream" error during some mail sending sessions.
It's not a constant error, after retrying a few times it works.
Our customers are mainly distributed throughout Italy, so i don't think the error to be related to physical connection issues.We use "SmtpClient" like this, by assigning "SecurityProtocolType" casting 768 and 3072 to enum (since our platform require targeting Framework 4.0, we don't have Tls11 and Tls12 enum value):
ServicePointManager.SecurityProtocol =
SecurityProtocolType.Tls Or
DirectCast(768, SecurityProtocolType) Or
DirectCast(3072, SecurityProtocolType)
ServicePointManager.ServerCertificateValidationCallback = Function() TrueClientMail = New SmtpClient()
ClientMail.TargetName = "STARTTLS/smtp.office365.com"
ClientMail.EnableSsl = True
ClientMail.DeliveryMethod = SmtpDeliveryMethod.NetworkIt has always worked but now we are having a lot of troubles.
Any help? -
Evan Knutson 6 Reputation points
2021-10-14T16:36:24.213+00:00 I am also having the same issue. It's intermittent too. I also upgraded to TLS 1.2 by upgrading to .NET 4.5.2.
-
Maxime Gagnon 6 Reputation points
2021-10-14T21:32:58.633+00:00 Same error here as well with an app developed for thousands of customers. We receive an unusual number of calls of very angry customers regarding this issue which is intermittent.
Of course I can't ask my customers to simply use another email of different providers as they use the same address for numerous years now or use paid office365 accounts...
I also made sure we use compatible version of TLS, and even with 1.1 or 1.2 , it doesn't always work.
Clearly something's wrong with Microsoft SMTP servers...