Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP 3 Classic ASP Active Server Pages 3.0 > Classic ASP Professional
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Classic ASP Professional For advanced coder questions in ASP 3. NOT for ASP.NET 1.0, 1.1, or 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Professional section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old February 13th, 2012, 09:31 PM
Friend of Wrox
Points: 6,664, Level: 34
Points: 6,664, Level: 34 Points: 6,664, Level: 34 Points: 6,664, Level: 34
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jan 2004
Location: Sydney, NSW, Australia.
Posts: 1,870
Thanks: 12
Thanked 20 Times in 20 Posts
Send a message via AIM to mat41
Default Sending mail on Windows 7 using CDOSYS

good day all

Having just moved to a new windows 7 machine using classic ASP I have a very annoying 'The transport failed to connect to the server.' on the .Send line of my mail code.

I am coding locally on a domain using a valid SMTP address. I have completely eliminated the code, domain/SMTP IP etc as the issue because the page works fine without delay on my XP machine.

The first time the page ran locally on Win 7 it did run however it hung for a good 20-30 seconds and did send the mail. When i run the page for the second time and everytime thereafter I get the same hang and the 'The transport failed to connect to the server.' on the .Send line.

My research so far has found others with the same behavior however no solutions. im figuring there is an IIS setting I need to change???

Help......TYIA
__________________
Wind is your friend
Matt
Reply With Quote
  #2 (permalink)  
Old February 14th, 2012, 10:16 AM
Authorized User
Points: 448, Level: 7
Points: 448, Level: 7 Points: 448, Level: 7 Points: 448, Level: 7
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jan 2011
Posts: 86
Thanks: 1
Thanked 12 Times in 12 Posts
Default

HI,

it might not be the issue your having but depending on what you use to send your mail, you might need to install CDO 1.2.1 yourselves...

See here for download: http://www.microsoft.com/download/en...s.aspx?id=3671
Reply With Quote
  #3 (permalink)  
Old February 14th, 2012, 05:28 PM
Friend of Wrox
Points: 6,664, Level: 34
Points: 6,664, Level: 34 Points: 6,664, Level: 34 Points: 6,664, Level: 34
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jan 2004
Location: Sydney, NSW, Australia.
Posts: 1,870
Thanks: 12
Thanked 20 Times in 20 Posts
Send a message via AIM to mat41
Default

Thank you for your input however that is not going to help, it appears to be a download for Exchange communicate with outlook. BTW to answer your question, I am using CDOSYS...
__________________
Wind is your friend
Matt
Reply With Quote
  #4 (permalink)  
Old March 2nd, 2012, 06:19 AM
Authorized User
Points: 40, Level: 1
Points: 40, Level: 1 Points: 40, Level: 1 Points: 40, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Mar 2012
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Dont use cdosys, change to cdonts its your best move, do something like this and you will be fine.

HTML Code:
if Request.querystring("actnow")="gonow" then

sch = "http://schemas.microsoft.com/cdo/configuration/" 

Set cdoConfig = Server.CreateObject("CDO.Configuration") 

cdoConfig.Fields.Item(sch & "sendusing") = 2 
cdoConfig.Fields.Item(sch & "smtpauthenticate") = 1 
cdoConfig.Fields.Item(sch & "smtpusessl") = True
cdoConfig.Fields.Item(sch & "smtpserverport") = 465
cdoConfig.Fields.Item(sch & "smtpserver") = "smtp.gmail.com" 
cdoConfig.Fields.Item(sch & "sendusername") = "youremail@gmail.com" 
cdoConfig.Fields.Item(sch & "sendpassword") = "yourpassword" 
cdoConfig.fields.update 

Set cdoMessage = Server.CreateObject("CDO.Message") 
Set cdoMessage.Configuration = cdoConfig 

cdoMessage.From = "youremail@gmail.com"
cdoMessage.To = sTo
cdoMessage.Subject = sSubject 
cdoMessage.TextBody = stxtBody
x = cdoMessage.Send 

if x > 0 then

        Response.Write x
        Response.End
        else
if Request.querystring("var_mal")="pass" then
response.Write("<script>alert('E-mail sent sussesfully!');location.href='index.asp'</script>")
else
response.Write("<script>alert('E-mail sent sussesfully!');location.href='javascript:history.go(-1)'</script>")
end if


End if
set session("e")= Nothing
Set cdoMessage = Nothing 
Set cdoConfig = Nothing


end if
At least this is my opinion, hope it help you in some way.
Reply With Quote
  #5 (permalink)  
Old March 4th, 2012, 06:01 PM
Friend of Wrox
Points: 6,664, Level: 34
Points: 6,664, Level: 34 Points: 6,664, Level: 34 Points: 6,664, Level: 34
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jan 2004
Location: Sydney, NSW, Australia.
Posts: 1,870
Thanks: 12
Thanked 20 Times in 20 Posts
Send a message via AIM to mat41
Default

Razstec -Thanks for your input however cdonts depreciated. It has not been reccomended for a fair while now, years in fact......So much so windows dont even ship the cdonts.dll with thier OS anymore. I believe they stopped when they shipped Windows 2003. I am aware the dll can be installed.......but not everyone owns, and has full admin rights to their servers.....

If you do some research you will find cdosys is the recommended mail method for classic ASP
__________________
Wind is your friend
Matt
Reply With Quote
  #6 (permalink)  
Old March 6th, 2012, 07:39 AM
Authorized User
Points: 40, Level: 1
Points: 40, Level: 1 Points: 40, Level: 1 Points: 40, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Mar 2012
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Im sorry my example was cdosys im always calling cdonts to ccdosys, sorry.

my example is cdosys, check it out.
Reply With Quote
  #7 (permalink)  
Old March 6th, 2012, 05:19 PM
Friend of Wrox
Points: 6,664, Level: 34
Points: 6,664, Level: 34 Points: 6,664, Level: 34 Points: 6,664, Level: 34
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jan 2004
Location: Sydney, NSW, Australia.
Posts: 1,870
Thanks: 12
Thanked 20 Times in 20 Posts
Send a message via AIM to mat41
Default

No need to apologize, thank you for your time and effort. If you read my post's subject you will see I am already using CDOSYS, also if you read the actual post you will see there is no issue with the mail code as it did fire and send successfully. I suspect its a Windows 7 /IIS 7+ setting/issue

A shame good ole classic ASP isnt so widely used anymore.......someone must have had this issue of CDOSYS not working no Win 7/IIS out of the box (with all the relevent enable classic ASP options on)
__________________
Wind is your friend
Matt
Reply With Quote
  #8 (permalink)  
Old March 7th, 2012, 05:07 AM
Authorized User
Points: 40, Level: 1
Points: 40, Level: 1 Points: 40, Level: 1 Points: 40, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Mar 2012
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Default

i actually test my pages on a windows 7 iis6 machine and it works fine, maybe you should increase your delay time....

im no expert but theres no harm in trying that.
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
failure sending e-mail (os is windows 7 and server is iis7) ruslandag ASP.NET 3.5 Professionals 2 September 17th, 2009 01:13 PM
Sending Mail Using CDOSYS in ASP artarasan Classic ASP Basics 1 May 12th, 2008 06:11 PM



All times are GMT -4. The time now is 05:15 PM.


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.