I have a VB.net Application running on the server which will be sending emails close to 200 everyday. Following is my coding:
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
The above codes runs inside a loop. The above code runs quite well without any issues. But once or twice a month, i get the following error message and application stops.
System.Runtime.InteropServices.COMException (0x80040213): The transport failed to connect to the server.
Can anybody help me fixing this issue or i m also open for any other better and advanced approach.