Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - CDOSYS Mail Form ? Anyone ?!?
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

CDOSYS Mail Form ? Anyone ?!?

 Post Reply Post Reply Page  <123
Author
dpyers View Drop Down
Senior Member
Senior Member


Joined: 12 May 2003
Status: Offline
Points: 3937
Post Options Post Options   Thanks (0) Thanks(0)   Quote dpyers Quote  Post ReplyReply Direct Link To This Post Posted: 23 July 2004 at 3:19pm

Your code should look like this...

<% 

'Integrated email
'Dimension variables
   Dim objCDOSYSCon 
   Dim strSmtpServer 
   strSmtpServer ="XXXXXXXX"
          
         Set objCDOSYSMail = Server.CreateObject("CDO.Message")
          Set objCDOSYSCon = Server.CreateObject ("CDO.Configuration")
              
           objCDOSYSCon.Fields("http://schemas.microsoft.com/cdo/config uration/smtpserver") = strSmtpServer
               objCDOSYSCon.Fields("http://schemas.microsoft.com/cdo/ configuration/smtpauthenticate") = 1
          objCDOSYSCon.Fields("http://schemas.microsoft.com/cdo/config uration/sendusername") = "mail@hootinanny.net"
          objCDOSYSCon.Fields("http://schemas.microsoft.com/cdo/config uration/sendpassword") = "**********"
           objCDOSYSCon.Fields("http://schemas.microsoft.com/cdo/config uration/smtpserverport")  = 25
           objCDOSYSCon.Fields("http://schemas.microsoft.com/cdo/config uration/sendusing") = 2
           objCDOSYSCon.Fields("http://schemas.microsoft.com/cdo/config uration/smtpconnectiontimeout") = 60
                objCDOSYSCon.Fields.Update
      
         Set objCDOSYSMail.Configuration = objCDOSYSCon
         objCDOSYSMail.From = Request("from")
         objCDOSYSMail.To = "mail@hootinanny.net"
         objCDOSYSMail.Subject = Request("subject")
         objCDOSYSMail.TextBody = Request("message")
         If strSmtpServer <> "" Then objCDOSYSMail.Send            
         Set objCDOSYSMail = Nothing
         Set objCDOSYSCon = Nothing
%>

Where XXXXXXXX = your mail server. You might want to try just using localhost first as most web hosts support that. If it doesn't work, then you have to get the proper mail server to use from your web host.

EDIT: Just looked at your dns. If localhost doesn't work, try mail.hootinanny.net.



Edited by dpyers

Lead me not into temptation... I know the short cut, follow me.
Back to Top
daystoolate View Drop Down
Newbie
Newbie
Avatar

Joined: 23 July 2004
Location: United States
Status: Offline
Points: 9
Post Options Post Options   Thanks (0) Thanks(0)   Quote daystoolate Quote  Post ReplyReply Direct Link To This Post Posted: 23 July 2004 at 3:42pm
ill try that

Edited by daystoolate
Back to Top
daystoolate View Drop Down
Newbie
Newbie
Avatar

Joined: 23 July 2004
Location: United States
Status: Offline
Points: 9
Post Options Post Options   Thanks (0) Thanks(0)   Quote daystoolate Quote  Post ReplyReply Direct Link To This Post Posted: 23 July 2004 at 3:51pm

Okay sir.

Here is what the code reads now.

<% 
'Integrated email
'Dimension variables
 Dim objCDOSYSCon
 Dim strSmtpServer
  strSmtpServer ="mail.hootinanny.net"
   
   Set objCDOSYSMail = Server.CreateObject("CDO.Message")
      Set objCDOSYSCon = Server.CreateObject ("CDO.Configuration")    
          
         objCDOSYSCon.Fields("http://schemas.microsoft.com/cdo/configuration/smtpserver") = strSmtpServer
     objCDOSYSCon.Fields(" http://schemas.microsoft.com/cdo/configuration/smtpauthentic ate") = 1
          objCDOSYSCon.Fields("http://schemas.microsoft.com/cdo/configuration/sendusername") = "mail@hootinanny.net"
          objCDOSYSCon.Fields("http://schemas.microsoft.com/cdo/configuration/sendpassword") = "**********"
         objCDOSYSCon.Fields(" http://schemas.microsoft.com/cdo/configuration/smtpserverpor t")  = 25
         objCDOSYSCon.Fields("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
         objCDOSYSCon.Fields(" http://schemas.microsoft.com/cdo/configuration/smtpconnectio ntimeout") = 60
                 objCDOSYSCon.Fields.Update
  
   Set objCDOSYSMail.Configuration = objCDOSYSCon
   objCDOSYSMail.From = Request("from")
   objCDOSYSMail.To = "mail@hootinanny.net"
   objCDOSYSMail.Subject = Request("subject")
   objCDOSYSMail.TextBody = Request("message")
   If strSmtpServer <> "" Then objCDOSYSMail.Send    
   Set objCDOSYSMail = Nothing
   Set objCDOSYSCon = Nothing
   Response.Write("Message Sent")
%>

and i am still getting this little error....

Quote

error '8004020e'

/include/send_mail.asp, line 26

 

Line 26 reads

Set objCDOSYSMail = Nothing



Edited by daystoolate
Back to Top
daystoolate View Drop Down
Newbie
Newbie
Avatar

Joined: 23 July 2004
Location: United States
Status: Offline
Points: 9
Post Options Post Options   Thanks (0) Thanks(0)   Quote daystoolate Quote  Post ReplyReply Direct Link To This Post Posted: 23 July 2004 at 3:58pm

layer_sx.asp contains the form that submits to send_mail.asp

Back to Top
daystoolate View Drop Down
Newbie
Newbie
Avatar

Joined: 23 July 2004
Location: United States
Status: Offline
Points: 9
Post Options Post Options   Thanks (0) Thanks(0)   Quote daystoolate Quote  Post ReplyReply Direct Link To This Post Posted: 23 July 2004 at 4:09pm

back to the same error...

Quote

error '8004020e'

/include/send_mail.asp, line 25

with this code

<%
'Integrated email
'Dimension variables
 Dim objCDOSYSCon
 Dim strSmtpServer
  strSmtpServer ="mail.hootinanny.net"
   
   Set objCDOSYSMail = Server.CreateObject("CDO.Message")
      Set objCDOSYSCon = Server.CreateObject ("CDO.Configuration")    
          
         objCDOSYSCon.Fields("http://schemas.microsoft.com/cdo/configuration/smtpserver") = strSmtpServer
     objCDOSYSCon.Fields(" http://schemas.microsoft.com/cdo/configuration/smtpauthentic ate") = 1
          objCDOSYSCon.Fields("http://schemas.microsoft.com/cdo/configuration/sendusername") = "mail@hootinanny.net"
          objCDOSYSCon.Fields("http://schemas.microsoft.com/cdo/configuration/sendpassword") = "**********"
         objCDOSYSCon.Fields(" http://schemas.microsoft.com/cdo/configuration/smtpserverpor t")  = 25
         objCDOSYSCon.Fields("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
         objCDOSYSCon.Fields(" http://schemas.microsoft.com/cdo/configuration/smtpconnectio ntimeout") = 60
                 objCDOSYSCon.Fields.Update
  
   Set objCDOSYSMail.Configuration = objCDOSYSCon
   objCDOSYSMail.From = Request("from")
   objCDOSYSMail.To = "mail@hootinanny.net"
   objCDOSYSMail.Subject = Request("subject")
   objCDOSYSMail.TextBody = Request("message")
   If strSmtpServer <> "" Then objCDOSYSMail.Send    
   Set objCDOSYSMail = Nothing
   Set objCDOSYSCon = Nothing
   Response.Write("Message Sent")
%>



Edited by daystoolate
Back to Top
dpyers View Drop Down
Senior Member
Senior Member


Joined: 12 May 2003
Status: Offline
Points: 3937
Post Options Post Options   Thanks (0) Thanks(0)   Quote dpyers Quote  Post ReplyReply Direct Link To This Post Posted: 23 July 2004 at 4:14pm

Founf this reference to the eror message http://www.aspfaq.com/show.asp?id=2026
If you search on that page for 8004020e, it says...

"If you get "8004020E" or "80040211" errors, and you are using a remote SMTP server, make sure that the web server can ping the SMTP server, and that the server is configured to allow SMTP relay, and that it doesn't require outgoing SMTP authentication. If it does, you may need to use the commercial version of ASPEmail, or another component that supports outgoing SMTP authentication. You can send e-mail to an SMTP server requiring outgoing authentication with CDO using the following code: "
...
"
You might also check that your SMTP server isn't restricted to a certain set of domain names in the recipients or senders lists (depending on what your SMTP software supports) and that the correct ports are open if there is a firewall or router sitting between your web server and the mail server."

Basically, it tosses the ball into your web host's court. They need to tell you the explicit server to use, if it requires authentication, and if it has any restrictions on who it can send to or any firewall/router blocking.


Lead me not into temptation... I know the short cut, follow me.
Back to Top
daystoolate View Drop Down
Newbie
Newbie
Avatar

Joined: 23 July 2004
Location: United States
Status: Offline
Points: 9
Post Options Post Options   Thanks (0) Thanks(0)   Quote daystoolate Quote  Post ReplyReply Direct Link To This Post Posted: 23 July 2004 at 4:22pm

you were right.  I changed the "from" tag to the mail@hootinanny.net address and it workd

thanks

Back to Top
dpyers View Drop Down
Senior Member
Senior Member


Joined: 12 May 2003
Status: Offline
Points: 3937
Post Options Post Options   Thanks (0) Thanks(0)   Quote dpyers Quote  Post ReplyReply Direct Link To This Post Posted: 23 July 2004 at 4:27pm
Just hate it when it's something like that!

Lead me not into temptation... I know the short cut, follow me.
Back to Top
 Post Reply Post Reply Page  <123

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.