0
我有一个VB.net应用程序运行在服务器上,将每天发送电子邮件接近200。以下是我的编码:传输失败连接到服务器 - CDO.Message - VB.NET
Dim objNewMail = CreateObject("CDO.Message")
objNewMail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
objNewMail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "localhost"
objNewMail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
objNewMail.Configuration.Fields.Update()
objNewMail.From = mailFrom
objNewMail.To = mailTO
objNewMail.CC = mailCC
objNewMail.bcc = mailBCC
objNewMail.Subject = mailSubject
objNewMail.HTMLBody = content
objNewMail.Send()
objNewMail = Nothing
上述代码在循环内运行。上面的代码运行良好,没有任何问题。但每月一到两次,我收到以下错误消息并停止应用程序。
System.Runtime.InteropServices.COMException(0x80040213):传输无法连接到服务器。
任何人都可以帮助我解决这个问题,或者我也打开任何其他更好的和先进的方法。