473,394 Members | 2,071 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

CDO Question: transport failed to connect to the server

I have code that I am using to sent an HTML email. (see code below)

Intermittently I am getting the following error when I try and send an
email message from ASP.Net code on my server. 80% of the time it works
fine -- but 20% of the time it
fails with the following message:
The transport failed to connect to the server.

I am setting the mail server via the IP address. It actually is the
local mail server, but I didn't want to have any DNS resolution issues
-- so I don't understand how it could ever not connect.

It only seems to be happening for HTML formatted emails. I have
similar code in .Net that sends text messages and it is working fine.

I have enabled the website IP it is coming from for connection and
relay within the SMTP properties in IIS.

This sounds like a configuration issue, but I don't understand why it
would be intermittent. It only seems to happen from my ASP.Net code. I
have ASP mailers that are
not seeing this problem.

If you go back and try and resend the same email a minute or so later
it will send.

This has happened about 9 times (out of probably 50 emails) in the
last 3 months. So it is a problem. I keep trying fixes but it is so
intermittent I cannot tell if it is fixed for sure until we see the
error occur again.

When it occurs the page takes a long time (maybe 5 minutes) to reload
-- like it is trying to contact the server and not getting through.

Does anyone have any ideas what might be wrong or how I can
troubleshoot this?

Thanks,
Lori

----------------------------------------------------------------------------

Dim mailMessage As New System.Web.Mail.MailMessage()

If From = "" Then 'Set default
mailMessage.From = "Me <me@nospam.com>"
Else
mailMessage.From = From
End If

mailMessage.To = ToAddresses

mailMessage.Bcc = BCCs

If Not _arListAttachments Is Nothing Then
Dim myEnumerator As System.Collections.IEnumerator =
_arListAttachments.GetEnumerator()
While myEnumerator.MoveNext()
mailMessage.Attachments.Add(New
MailAttachment(myEnumerator.Current.ToString,
System.Web.Mail.MailEncoding.Base64))
End While
End If

If LCase(Priority) = "high" Then
mailMessage.Priority = System.Web.Mail.MailPriority.High
ElseIf LCase(Priority) = "low" Then
mailMessage.Priority = System.Web.Mail.MailPriority.Low
End If

mailMessage.BodyFormat = System.Web.Mail.MailFormat.Html

Dim strBody As String
Dim strDBSubject As String

'This routine gets the Body of the message using a template database
driven system
GetMessage(strBody, strDBSubject, intError)

If intError = 0 Then
mailMessage.Body = strBody

If Subject <> "" Then 'Set default
mailMessage.Subject = Subject
ElseIf strDBSubject <> "" Then
mailMessage.Subject = strDBSubject
Else
mailMessage.Subject = ""
End If

System.Web.Mail.SmtpMail.SmtpServer = _strMailServer

System.Web.Mail.SmtpMail.Send(mailMessage)

End If
Nov 18 '05 #1
0 2319

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: jason | last post by:
I discovered this morning that a few of my sites have routines to automatically email when pages are accessed. These pages were down becuase the the smtp server I'm using was down. I would see a...
0
by: mamatha | last post by:
Hi i have one email application in VB.I want to send an Email through SMTP server.While i am sending it gives error like"transport failed to connect to the server" can help anyone for me ...
1
by: Sudhan | last post by:
When i am trying to send in asp.net i am geting this Error Message:Transport Failed to connect to the Server. I am using SMTP server in my localMachine and Sify connction I am New to ASP.Net MY...
0
by: Hawksey | last post by:
Hello, Has anyone else experienced a similar problem. We get an intermittent error trying to send mail using smtpmail. Our SmtpMail.SmtpServer is a different server to our web application...
5
by: Nathan Sokalski | last post by:
I am attempting to send an email using ASP.NET 1.1's Mail.SmtpMail.Send() method. My code contains all of the following: Dim mailmsg As New Mail.MailMessage Mail.SmtpMail.SmtpServer =...
0
jpcarre
by: jpcarre | last post by:
Hello all, I have a testing server and a development server. In the testing server my CDOSYS email application works fine, I am using an external smtp port which is smtp.serv.cgnet.com , however,...
0
by: wizromeo | last post by:
Hello, Has anyone else experienced a similar problem. We get an intermittent error trying to send mail using smtpmail. Our SmtpMail.SmtpServer is a different server to our web application...
1
by: dancer | last post by:
Using Framework 1.1, ASP.net 1.1 I test my applications that send e-mail on my personal computer : iis - local host - wwwroot - no problems. Then all of a sudden I get this error: "Transport...
0
by: daredevil | last post by:
hi all, i am newbie here. i was trying to send mail from ASP, but i encountered the error as below:- CDO.Message.1 (0x80040213) The transport failed to connect to the server. i already google...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.