473,405 Members | 2,262 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,405 software developers and data experts.

CDO.Message.1 (0x80040213) The transport failed to connect to the server.

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....
Expand|Select|Wrap|Line Numbers
  1. <!--METADATA TYPE="typelib" UUID="CD000000-8B95-11D1-82DB-00C04FB1625D"  NAME="CDO for Windows 2000 Library" -->
  2. <!--METADATA TYPE="typelib"  UUID="00000205-0000-0010-8000-00AA006D2EA4"  NAME="ADODB Type Library" -->
  3.  
  4. <%
  5.  
  6. 'Const cdoSendUsingMethod        = _
  7. '    "http://schemas.microsoft.com/cdo/configuration/sendusing"
  8.  
  9.  
  10. Const cdoSendUsingMethod1 =  "http://schemas.microsoft.com/cdo/configuration/sendusing"  
  11.  
  12. Const cdoSendUsingPort1          = 2
  13. Const cdoSMTPServer1             = _
  14.     "http://schemas.microsoft.com/cdo/configuration/smtpserver"
  15. Const cdoSMTPServerPort1         = _
  16.     "http://schemas.microsoft.com/cdo/configuration/smtpserverport"
  17. Const cdoSMTPConnectionTimeout1  = _
  18.     "http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout"
  19. Const cdoSMTPAuthenticate1       = _
  20.     "http://schemas.microsoft.com/cdo/configuration/smtpauthenticate"
  21. Const cdoBasic1                  = 1
  22. Const cdoSendUserName1           = _
  23.     "http://schemas.microsoft.com/cdo/configuration/sendusername"
  24. Const cdoSendPassword1           = _
  25.     "http://schemas.microsoft.com/cdo/configuration/sendpassword"
  26.  
  27. Dim objConfig  ' As CDO.Configuration
  28. Dim objMessage ' As CDO.Message
  29. Dim Fields     ' As ADODB.Fields
  30.  
  31. ' Get a handle on the config object and it's fields
  32. Set objConfig = Server.CreateObject("CDO.Configuration")
  33. Set Fields = objConfig.Fields
  34.  
  35. ' Set config fields we care about
  36. With Fields
  37.     .Item(cdoSendUsingMethod1)       = cdoSendUsingPort1
  38.     .Item(cdoSMTPServer1)            = "smtp.gmail.com."
  39.     .Item(cdoSMTPServerPort1)        = 465
  40. 'gmail also    .Item(cdoSMTPServerPort1)        = 465
  41.     .Item(cdoSMTPConnectionTimeout1) = 10
  42.     .Item(cdoSMTPAuthenticate1)      = cdoBasic1
  43.     .Item(cdoSendUserName1)          = "me@gmail.com"
  44.     .Item(cdoSendPassword1)          = "xxxxxxxx"
  45.  
  46.     .Update
  47. End With
  48.  
  49. Set objMessage = Server.CreateObject("CDO.Message")
  50.  
  51. Set objMessage.Configuration = objConfig
  52.  
  53. With objMessage
  54.     .To       = "me@yahoo.com"
  55.     .From     = "me@gmail.com"
  56.     .Subject  = "SMTP Relay Test"
  57.     .TextBody = "SMTP Relay Test Sent @ " & Now()
  58.     .Send
  59. End With
  60.  
  61. Set Fields = Nothing
  62. Set objMessage = Nothing
  63. Set objConfig = Nothing
  64. %>
Nov 21 '09 #1
0 5204

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Henrik Bergman | last post by:
Hi all As I subscribe MSDN I got an USB-memory with Microsoft eLearing library. I found an exampell how to send SMTP e-mail using CDO.Message object and CDO.Configuration. But when I try to...
6
by: Paul | last post by:
I am using CDO.Message object with code below. When I execute the .Send command, I get the following error. Error: -2147220973 Description: The transport failed to connect to the server. ...
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...
2
by: Martin | last post by:
Hi, I have standard code that sends mail from an asp.net application. The application is running on a production web server. it uses the standard system.web.mail namespace. most of the time...
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 ...
0
by: Henrik Bergman | last post by:
Hi all As I subscribe MSDN I got an USB-memory with Microsoft eLearing library. I found an exampell how to send SMTP e-mail using CDO.Message object and CDO.Configuration. MSDN has also got...
0
by: palmem | last post by:
I am trying to write a simple FTP server in order to learn about sockets This is my first time trying sockets This code should take a connection on port 8110, dump it to a client "thread" (not...
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...
6
Cintury
by: Cintury | last post by:
Hi all, I've developed a mobile application for windows mobile 5.0 that has been in use for a while (1 year and a couple of months). It was developed in visual studios 2005 with a back-end sql...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
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
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...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
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...
0
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...

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.