• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 625
  • Last Modified:

looking for a ASP template using CDOSYS and CAPTCHA for a contact form

im having problems looking for a ASP template using CDOSYS and CAPTCHA for a contact form. Can anyone help me out?

my Requirements are: It must be ASP and CDOSYS, and some kind of image/question verification.
0
davidechen
Asked:
davidechen
  • 6
  • 4
  • 2
2 Solutions
 
sybeCommented:
I like this CAPTCHA solution: http://www.u229.no/stuff/Captcha/



0
 
davidechenAuthor Commented:
how would i get that catcha code to work with the following CDOSYS form that i have attached?

NOTE that i only want ONE  button that does both send and the captcha check?
<%
	'----------------------------------------------------------------------------
	'
	'	Send email using the CDOSYS component
	'
	'	by Chris Hardy
	'	http://www.chrishardy.co.uk/
	'
	'----------------------------------------------------------------------------
 
  Option Explicit
 
  dim sName, sEmail, sMessage
	dim oCdoMail, oCdoConf, sConfURL
 
  if Request.Form("Action") <> "" then
    sName = Request.Form("Name")
    sEmail = Request.Form("Email")
    sMessage = Request.Form("Message")
 
		Set oCdoMail = Server.CreateObject("CDO.Message")
		Set oCdoConf = Server.CreateObject("CDO.Configuration")
 
		sConfURL = "http://schemas.microsoft.com/cdo/configuration/"
 
		with oCdoConf
			.Fields.Item(sConfURL & "sendusing") = 2
			.Fields.Item(sConfURL & "smtpserver") = "mydomain.com"
			.Fields.Item(sConfURL & "smtpserverport") = 8
			.Fields.Update
		end with
 
		with oCdoMail
			.From = "admin@mydomain.com"
			.To = sEmail
			.Subject = "My message subject"
			.TextBody = sMessage
			.HTMLBody = sMessage
			.Configuration = oCdoConf
			.Send
		end with
 
		Set oCdoConf = Nothing
		Set oCdoMail = Nothing
 
    response.write "Thanks for your message!"
  else
%>
 
<form method="post" action="<%=Request.ServerVariables("SCRIPT_NAME")%>">
<p>Name:<br /><input type="text" name="Name" /></p>
<p>E-mail:<br /><input type="text" name="Email" /></p>
<p>Message:<br /><textarea name="Message"></textarea></p>
<p><input type="submit" name="Action" value="Send Now" /></p>
</form>
<%
  end if
%>

Open in new window

0
 
Wayne BarronAuthor, Web DeveloperCommented:
Got something for you.
Information
http://www.webwizguide.com/webwizcaptcha/default.asp
Demo
http://www.webwizguide.com/webwizcaptcha/demo/
Download
http://www.webwizguide.com/webwizcaptcha/downloads.asp

Unzip and run   example.asp
Name
CAPTCHA code.
submit.

This will submit the form.
This is what you are looking for.

Just add your Mail code to it and this should do it.
Carrzkiss
0
Introducing Cloud Class® training courses

Tech changes fast. You can learn faster. That’s why we’re bringing professional training courses to Experts Exchange. With a subscription, you can access all the Cloud Class® courses to expand your education, prep for certifications, and get top-notch instructions.

 
Wayne BarronAuthor, Web DeveloperCommented:
Any luck with this and the code link provided above?
0
 
davidechenAuthor Commented:
i tried using that web wiz and that following code is what i came up with and it doesnt seem to work.

Anyone have any other ideas or template of some kind that has some kind of verification that is compatible with windows 2003 IIS?


<!-- Include file for CAPTCHA configuration -->
<!-- #include file="CAPTCHA/CAPTCHA_configuration.asp" -->
 
<!-- Include file for CAPTCHA form processing --> 
<!-- #include file="CAPTCHA/CAPTCHA_process_form.asp" -->
<%
	'----------------------------------------------------------------------------
	'
	'	Send email using the CDOSYS component
	'
	'	by Chris Hardy
	'	http://www.chrishardy.co.uk/
	'
	'----------------------------------------------------------------------------
 
  Option Explicit
 
  dim sName, sEmail, sMessage
	dim oCdoMail, oCdoConf, sConfURL
 
  if Request.Form("Action") <> "" then
    sName = Request.Form("Name")
    sEmail = Request.Form("Email")
    sMessage = Request.Form("Message")
 
		Set oCdoMail = Server.CreateObject("CDO.Message")
		Set oCdoConf = Server.CreateObject("CDO.Configuration")
 
		sConfURL = "http://schemas.microsoft.com/cdo/configuration/"
 
		with oCdoConf
			.Fields.Item(sConfURL & "sendusing") = 2
			.Fields.Item(sConfURL & "smtpserver") = "aeroarc.com"
			.Fields.Item(sConfURL & "smtpserverport") = 8
			.Fields.Update
		end with
 
		with oCdoMail
			.From = "dcadmin@aeroarc.com"
			.To = sEmail
			.Subject = "My message subject"
			.TextBody = sMessage
			.HTMLBody = sMessage
			.Configuration = oCdoConf
			.Send
		end with
 
		Set oCdoConf = Nothing
		Set oCdoMail = Nothing
 
    response.write "Thanks for your message!"
  else
%>
 
<form method="post" action="<%=Request.ServerVariables("SCRIPT_NAME")%>">
<p>Name:<br /><input type="text" name="Name" /></p>
<p>E-mail:<br /><input type="text" name="Email" /></p>
<p>Message:<br /><textarea name="Message"></textarea></p>
<p><input type="submit" name="Action" value="Send Now" /></p>
<!-- include the Web Wiz CAPTCHA form element -->
<!--#include file="CAPTCHA/CAPTCHA_form_inc.asp" -->
</form>
 
<%
  end if
%>

Open in new window

0
 
davidechenAuthor Commented:
i meant to say....

Anyone have any other ideas or template of some kind that has some kind of verification that is compatible with MICROSOFT SERVER 2003 's  IIS?
0
 
sybeCommented:
Do I understand it right that you just want a ready-made solution?  Because if that is so, I am sorry, that is not what I want to deliver here.

0
 
Wayne BarronAuthor, Web DeveloperCommented:
David are you using the code correctly?
All you are doing with the CAPTCHA is taking the demo that I supplied and adding it into your Mail Form.
In the Forms OnSubmit.
What is so hard about doing that? Why is it that it is not working for you?
It is as simple as it can get.
0
 
davidechenAuthor Commented:
i need it to be a 1 form ASP, i need the entire code to be on one asp form because of the cdosys code that is used for windows 2003.
0
 
Wayne BarronAuthor, Web DeveloperCommented:
david
The code that I supplied via the links provided. Will do what you need.
You just have to look at the code and try it.

You are NOT going to find a simple code that will do this in 1 page layout.
The CAPTCHA is not a 1 page code setup.
AND Further more.
The CDOSYS is not going to notice on rather or not your have 1 page or 50 pages.
You need download the script.
Run the example.asp page.
And you will see how it works.
THEN
Implement your CDOSYS code into this.

That simple.

I do not have CDOSYS installed on my system, and do not really feel like installing it if I do not have to.
So. please, please, please.
Try the code that is provided.

Information
http://www.webwizguide.com/webwizcaptcha/default.asp
Demo
http://www.webwizguide.com/webwizcaptcha/demo/
Download
http://www.webwizguide.com/webwizcaptcha/downloads.asp

It is everything that you need and more.
You cannot get no more simpler then this is.

Carrzkiss
0
 
davidechenAuthor Commented:
ok ill try it out within the next three days and ill post back and let you know how it goes.
0
 
davidechenAuthor Commented:
sorry guys, havent had time to try it out, ill have it for sure tested out by the end of this week. I appreciate all the help and pacience you guys have. Sorry, but ive been so  busy.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Python 3 Fundamentals

This course will teach participants about installing and configuring Python, syntax, importing, statements, types, strings, booleans, files, lists, tuples, comprehensions, functions, and classes.

  • 6
  • 4
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now