473,387 Members | 1,863 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,387 software developers and data experts.

How to fix "transport errror 0x80040217: message could not be sent to the SMTP . ."?

1
I am using asp with vbscript.
for sending mail CDO object is used but giving transport errror 0x80040217.
But the same code is running on live in another server.
I am using the port 25,also having authentication.I am facing this problem last 10 days.Please resolve.
Expand|Select|Wrap|Line Numbers
  1. Const cdoSendUsingMethod = "http://schemas.microsoft.com/cdo/configuration/sendusing"
  2. Const cdoSendUsingPort = 2
  3. Const cdoSMTPServer = "http://schemas.microsoft.com/cdo/configuration/smtpserver"
  4. Const cdoSMTPServerPort = "http://schemas.microsoft.com/cdo/configuration/smtpserverport"
  5. Const cdoSMTPConnectionTimeout = "http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout"
  6. Const cdoSMTPAuthenticate = "http://schemas.microsoft.com/cdo/configuration/smtpauthenticate"
  7. Const cdoBasic = 1
  8. Const cdoSendUserName = "http://schemas.microsoft.com/cdo/configuration/sendusername"
  9. Const cdoSendPassword = "http://schemas.microsoft.com/cdo/configuration/sendpassword"
  10.  
  11. Dim objConfig 
  12. Dim objMessage 
  13. Dim Fields 
  14.  
  15. Set objConfig = CreateObject("CDO.Configuration")
  16. Set Fields = objConfig.Fields
  17.  
  18. With Fields
  19. .Item(cdoSendUsingMethod) = cdoSendUsingPort
  20. .Item(cdoSMTPServer) = "<smtp server>"
  21. .Item(cdoSMTPServerPort) = 25
  22. .Item(cdoSMTPConnectionTimeout) = 100
  23. .Item(cdoSMTPAuthenticate) = cdoBasic
  24. .Item(cdoSendUserName) = "<username>"
  25. .Item(cdoSendPassword) = "<password>"
  26.  
  27. .Update
  28. End With
  29.  
  30. Set objMessage = CreateObject("CDO.Message")
  31.  
  32. Set objMessage.Configuration = objConfig
  33.  
  34. With objMessage
  35. .To = "'Name' <Adress>"
  36. .from = "'Name' <Adress>"
  37. .Subject = "SMTP Relay Test"
  38. .TextBody = "SMTP Relay Test Sent @ " & Now()
  39. .Send
  40. End With
  41.  
  42. Set Fields = Nothing
  43. Set objMessage = Nothing
  44. Set objConfig = Nothing
Dec 4 '10 #1
0 3023

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

Similar topics

2
by: Mike Obiku | last post by:
First of all, I'm new to PHP. For my website I have some PHP scripts to run a photo database. New users have to register them selfs. After registring the new user is getting an e-mail maid by an...
2
by: Jeff Magouirk | last post by:
Dear All, I have written an update trigger that should write a message to an audit table When I try to update any field in the table I recieve the following error message - Stirng or...
2
by: JohnD | last post by:
I am using XP Pro and when I try and run an ASP.NET page on my own server I recieve the following error messag Server cannot access application directory ..(web directory here)... The directory...
2
by: Chris Pearson | last post by:
I recently set up a web site which I am running locally on my laptop using ASP.Net. From a web form on the site I am attempting to send an email programmatically using the CDONTS class to an SMTP...
8
by: Rod | last post by:
I have been working with ASP.NET 1.1 for quite a while now. For some reason, opening some ASP.NET applications we wrote is producing the following error message: "The Web server reported...
5
by: Bruce Schechter | last post by:
I just started to develop an ASP.NET application in vs.net 2003 . But each time I try to execute the application (which is basically empty so far), I get a dialog box titled "Microsoft Development...
8
by: pmud | last post by:
Hi, I am using a compare validator in asp.net application(c# code). This Custom validator is used for comparing a value enterd by the user against the primary key in the SQL database. IF the...
1
by: ashim.chowdhury | last post by:
While using mail() function in PHP I am getting thjis error Warning: mail(): SMTP server response: 505 5.7.3 Must issue a STARTTLS command first I have used...
2
by: Scott | last post by:
I have a BeforeUpdate Event Procedure as below and got an error message. BeforeUpdate Event Procedure If IsNull() Then = Now() Else = Now() End If
0
by: crystalite | last post by:
Hi all, I am doing a form authentication for this program which involves SQL Server database and also using SQL Server as my session state management. I have done my program on my local computer...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
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
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,...

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.