?
Solved

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

Posted on 2009-02-20
14
Medium Priority
?
615 Views
Last Modified: 2012-08-13
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
Comment
Question by:davidechen
  • 6
  • 4
  • 2
12 Comments
 
LVL 28

Accepted Solution

by:
sybe earned 252 total points
ID: 23695455
I like this CAPTCHA solution: http://www.u229.no/stuff/Captcha/



0
 

Author Comment

by:davidechen
ID: 23696590
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
 
LVL 31

Assisted Solution

by:Wayne Barron
Wayne Barron earned 248 total points
ID: 23698568
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
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
LVL 31

Expert Comment

by:Wayne Barron
ID: 23701967
Any luck with this and the code link provided above?
0
 

Author Comment

by:davidechen
ID: 23759800
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
 

Author Comment

by:davidechen
ID: 23759807
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
 
LVL 28

Expert Comment

by:sybe
ID: 23759884
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
 
LVL 31

Expert Comment

by:Wayne Barron
ID: 23760391
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
 

Author Comment

by:davidechen
ID: 23822162
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
 
LVL 31

Expert Comment

by:Wayne Barron
ID: 23834409
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
 

Author Comment

by:davidechen
ID: 23837651
ok ill try it out within the next three days and ill post back and let you know how it goes.
0
 

Author Comment

by:davidechen
ID: 23962529
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

Featured Post

Vote for the Most Valuable Expert

It’s time to recognize experts that go above and beyond with helpful solutions and engagement on site. Choose from the top experts in the Hall of Fame or on the right rail of your favorite topic page. Look for the blue “Nominate” button on their profile to vote.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Hello, all! I just recently started using Microsoft's IIS 7.5 within Windows 7, as I just downloaded and installed the 90 day trial of Windows 7. (Got to love Microsoft for allowing 90 days) The main reason for downloading and testing Windows 7 is t…
I would like to start this tip/trick by saying Thank You, to all who said that this could not be done, as it forced me to make sure that it could be accomplished. :) To start, I want to make sure everyone understands the importance of utilizing p…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an anti-spam), the admin…
As many of you are aware about Scanpst.exe utility which is owned by Microsoft itself to repair inaccessible or damaged PST files, but the question is do you really think Scanpst.exe is capable to repair all sorts of PST related corruption issues?
Suggested Courses

807 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question