I added a TImeout of 200000 and I don't get an error message anymore.
https://learn.microsoft.com/de-de/dotnet/api/system.net.mail.smtpclient.timeout?view=net-6.0
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Is there a problem with microsoft 365 online? Sending bills to customers via an vb.net app. Sometimes sending works fine, sometimes errors occure on every Email or on some oft them.
I use (not complete code but the mainstuff)
Dim Msg As New MailMessage
Dim myCredentials As New System.Net.NetworkCredential
myCredentials.UserName = Username
myCredentials.Password = Password
Msg.IsBodyHtml = AsHTML
Dim mySmtpsvr As New SmtpClient() 'and I send the mails with attached PDF in a loop.
mySmtpsvr.Host = Host
mySmtpsvr.Port = Port
mySmtpsvr.EnableSsl = True
mySmtpsvr.UseDefaultCredentials = False
mySmtpsvr.Credentials = myCredentials
mySmtpsvr.Send(Msg)
It was always working fine since a couple of weeks. The problem seems to be depended on the day maybe time?
Sombody knows?
Thank you very much
I added a TImeout of 200000 and I don't get an error message anymore.
https://learn.microsoft.com/de-de/dotnet/api/system.net.mail.smtpclient.timeout?view=net-6.0
I think I found the solution: https://stackoverflow.com/questions/28362132/office-365-smtp-starts-firing-net-io-connectionclosed
Bassicly , adding the line System.Net.ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12 seemed to solve my issue.
Hi,
Did someone already found a solution for this?
Im having the exact same issue since a couple of weeks.
Sometimes it send a couple of mails fine, and sometimes im getting the error : net_io_connectionclosed.
thnks!
Hi @Klaus Ketelhut
The cause of this error may be diverse, I have found an article which talks about this exception:
https://stackoverflow.com/questions/35751844/smtp-5-7-57-error-when-trying-to-send-email-via-office-365
Note: Microsoft is providing this information as a convenience to you. The sites are not controlled by Microsoft. Microsoft cannot make any representations regarding the quality, safety, or suitability of any software or information found there. Please make sure that you completely understand the risk before retrieving any suggestions from the above link.
If you still need further assistance, I suggest you to open a service request in Microsoft 365 admin center for better help.
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.