Hi there, this is my first post to this forum. I hope that someone can help me. I am the webmaster for www.camphanover.com and am having trouble with CDONTS with their web host. It just does not seem to be emailing me the information.
I have tried the following html form and script:
==sendmail.htm==
<html>
<head>
<title>Send Mail</title>
</head>
<body bgcolor="#FFFFFF">
<form method="POST" action=”/scripts/sendmail.asp”>
<h3 align="center">CDONTS Send Email Simple Form Example</h3>
<p>To: <input type="text" size="30" name="To"></p>
<p>From: <input type="text" size="30" name="From"></p>
<p>Subject: <input type="text" size="30" name="Sub"></p>
<p>Message Text:<br>
<textarea name="Message" rows="10" cols="80"></textarea></p>
<p align="center"><input type="submit" name="Send"
value="Submit"><input type="reset" name="Cancel"
value="Reset"></p>
</form>
</body>
</html>
==end sendmail.htm==
==sendmail.asp==
<%@ LANGUAGE="VBSCRIPT" %>
<%
Dim objMail, strFrom, strTo, strSubject, strBody
strTo = Trim(Request.Form("To"))
strSubject = Trim(Request.Form("Sub"))
strFrom = Trim(Request.Form("From"))
strBody = Trim(Request.Form("Message"))
Set objMail = Server.CreateObject("CDONTS.NewMail")
objMail.From = strFrom
objMail.To = strTo
objMail.Subject = strSubject
objMail.Body = strBody
objMail.Send
Set objMail = Nothing
%>
==end sendmail.asp==
...and this has worked perfectly on another server but they are hosting with GoDaddy.com and for some reason this does not work with their setup. I emailed their customer support and got the following reply...
Thank you for contacting customer support. Unfortunately, we will be unable to assist you with the code of your test site. However, here is an example of a Cdonts script that is currently working with our ASP hosting package with an auto-redirection at the end so that you can compare your code with this one:
< from = request.form("from") email = request.form("to") body = request.form("body") subject = request.form("subject") >
< Dim objMail Set objMail = Server.CreateObject("CDONTS.NewMail") objMail.From = from objMail.Subject = subject objMail.To = email objMail.Body = body objMail.Send Response.redirect "thankyou.asp" <- auto-redirection 'You must always do this with CDONTS. Set objMail = Nothing >
...but I'm not very good with ASP. Can someone PLEASE help me intergrate this code into the form? I would be most grateful.
Basically, I have a much more complicated form 'in the wings' as it were but if I could get it working on their servers I can impliment it without too much difficulty.
Thanks for any help in advance.
Regards
Richard
|