473,651 Members | 3,068 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.Fro m = "Me <me@nospam.com> "
Else
mailMessage.Fro m = From
End If

mailMessage.To = ToAddresses

mailMessage.Bcc = BCCs

If Not _arListAttachme nts Is Nothing Then
Dim myEnumerator As System.Collecti ons.IEnumerator =
_arListAttachme nts.GetEnumerat or()
While myEnumerator.Mo veNext()
mailMessage.Att achments.Add(Ne w
MailAttachment( myEnumerator.Cu rrent.ToString,
System.Web.Mail .MailEncoding.B ase64))
End While
End If

If LCase(Priority) = "high" Then
mailMessage.Pri ority = System.Web.Mail .MailPriority.H igh
ElseIf LCase(Priority) = "low" Then
mailMessage.Pri ority = System.Web.Mail .MailPriority.L ow
End If

mailMessage.Bod yFormat = System.Web.Mail .MailFormat.Htm l

Dim strBody As String
Dim strDBSubject As String

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

If intError = 0 Then
mailMessage.Bod y = strBody

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

System.Web.Mail .SmtpMail.SmtpS erver = _strMailServer

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

End If
Nov 18 '05 #1
0 2349

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

Similar topics

2
2201
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 delay to load the page for about 10 seconds followed by the : The transport failed to connect error. using the following code to email: SmtpMail.Send(mail)
0
1370
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 Mamatha
1
2150
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 Code: private void Button1_Click(object sender, System.EventArgs e) { MailMessage mail = new MailMessage(); mail.To=Request.Form; mail.From =Request.Form ;
0
1866
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 servers. Every now and again my error logs will indicate that the sendmail method failed with the exception "Could not Access CDO Message Object" with an inner exception of "The transport failed to connect to the server". The funny thing is the method...
5
2491
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 = System.Configuration.ConfigurationSettings.AppSettings("smtpserver") mailmsg.BodyFormat = Mail.MailFormat.Text mailmsg.Subject = "My Subject"
0
1879
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, when I test this same program in the development server I receive the following error message : CDO.Message.1 error '80040213' The transport failed to connect to the server. I am using ASP and ASP.NET I have the same problem with both codes,...
0
2699
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 servers. Every now and again my error logs will indicate that the sendmail method failed with the exception "Could not Access CDO Message Object" with an inner exception of "The transport failed to connect to the server". The funny thing is the method...
1
2223
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 failed to connect to the server" I try applications that HAVE RUN FINE IN THE PAST. Still this error. I download to my hosting server, and the application runs without problems. I changed nothing in my iis setup.
0
5267
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 about the error and tried to fix error, but seems like the error unable to solve. Hope that someone can help me with the error. thanks a lot in advance. below are the codes that i applied.... <!--METADATA TYPE="typelib"...
0
8279
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8703
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8589
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6160
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5619
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4145
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4291
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2703
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1914
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.