WebProWorld Part of WebProNews.com
Page One Link To Us Edit Profile Private Messages Archives FAQ RSS Feeds  
 

Go Back   WebProWorld > Webmaster, IT and Security Discussion > IT Discussion Forum
Subscribe to the Newsletter FREE!


Register FAQ Members List Calendar Arcade Chatbox Mark Forums Read

IT Discussion Forum Having IT issues? Got IT questions? Who doesn't? If you can't get your Apache to work with your MySQL or your php is choking on your ODBC... Let's see if we can help you come up with some ideas.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 01-30-2008, 05:36 PM
lucasmaximus lucasmaximus is offline
WebProWorld New Member
 

Join Date: Oct 2007
Posts: 1
lucasmaximus RepRank 0
Default Converting CDONTS to CDOSYS

Hi Guys,

Was wondering if somebody on the forums could help me with a problem with a web form.
I have a simple form on a HTML page, all code below. Trouble is, its got to be uploaded with the rest of the site onto an asp server which doesnt support CDONTS, only CDOSYS. I'm told the .asp file I have used uses the now extinct CDONTS. All I need is for the info entered into the form fields (name, email add, phone no, comments) to send to a specified email address.
I'm guessing I need a valid .asp file to upload with the site. Please please help!!

Lucy
My html code for the form is;

<form method="POST" action="contact.asp">

<p>Name:<br>
<input type="text" name="Name">

<p>Email Address: <br>
<input type="text" name="EmailFrom">
<p>PhoneNumber:<br>
<input type="text" name="PhoneNumber">
<p>Comments:<br>

<textarea name="Comments"></textarea>
<p><input class="red" type="submit" name="submit" value="SEND">
</form>
<p>


...........and my .asp file code is;

<%
' Website Contact Form Generator
' Website Contact Form Generator - ASP, PHP, CGI Email Form Scripts
' This script is free to use as long as you
' retain the credit link

' declare variables
Dim EmailFrom
Dim EmailTo
Dim Subject
Dim Name
Dim PhoneNumber
Dim Comments

' get posted data into variables
EmailFrom = Trim(Request.Form("EmailFrom"))
EmailTo = "sales@vanquishcarhire.co.uk"
Subject = "Website Booking Form"
Name = Trim(Request.Form("Name"))
PhoneNumber = Trim(Request.Form("PhoneNumber"))
Comments = Trim(Request.Form("Comments"))

' validation
Dim validationOK
validationOK=true
If (Trim(EmailFrom)="") Then validationOK=false
If (validationOK=false) Then Response.Redirect("error.htm?" & EmailFrom)

' prepare email body text
Dim Body
Body = Body & "Name: " & Name & VbCrLf
Body = Body & "PhoneNumber: " & PhoneNumber & VbCrLf
Body = Body & "Comments: " & Comments & VbCrLf

' send email
Dim mail
Set mail = Server.CreateObject("CDONTS.NewMail")
mail.To = EmailTo
mail.From = EmailFrom
mail.Subject = Subject
mail.Body = Body
mail.Send

' redirect to success page
Response.Redirect("ok.htm?" & EmailFrom)
%>


I hope this is enough info for somebody to make sense of....any help would be much appreciated!

Reply With Quote
Reply

  WebProWorld > Webmaster, IT and Security Discussion > IT Discussion Forum


Thread Tools
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

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Converting documents to .pdf Jeff Sundin Graphics & Design Discussion Forum 10 02-26-2008 06:47 AM
Converting .dfx to .dwg - Any ideas carju1 Breakroom (General: Any Topic) 2 04-04-2006 08:27 PM
Converting from DVD to Flash... N30 Flash Discussion Forum 6 02-16-2006 04:54 AM
Converting to CSS H4KSY Web Programming Discussion Forum 14 03-05-2004 11:24 AM
help for mail application using cdonts shankarmvv Web Programming Discussion Forum 0 11-07-2003 06:27 AM


Search Engine Friendly URLs by vBSEO 3.0.0