Current location: Hot Scripts Forums » Programming Languages » ASP » ASP forms using SYScondonts


ASP forms using SYScondonts

Reply
  #1 (permalink)  
Old 10-26-05, 03:23 PM
rkctruepros rkctruepros is offline
New Member
 
Join Date: Oct 2005
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
ASP forms using SYScondonts

not shure thats spelled right but i am looking for a programe that will completely code a contact form in asp script or for that matter aspx all i have been able to find is one that will code in perl and cgi i am trying the new visual studio web developer 2005 but that needs a data base to do every thing and this is highly sensitve information i am not allowed to keep it for more than 3 days and i dont have time to go an empty a dat base every 3 days but the form i want it to submit right to my email using my secure email server line
Reply With Quote
  #2 (permalink)  
Old 10-27-05, 03:38 AM
toth toth is offline
Newbie Coder
 
Join Date: Oct 2005
Posts: 17
Thanks: 0
Thanked 0 Times in 0 Posts
Here's a CDOSYS mail system.

Youre ASP mail script, let's call it MailScript.asp:

Code:
<%
Dim MyMail
Dim MyBody
Dim MyName
Dim MyEmail
Dim MyComments

MyName = Request.Form("name")
MyEmail = Request.Form("email")
MyComments = Request.Form("comments")

MyBody = "Name: "& MyName & vbcrlf
MyBody = MyBody & "Email: "& MyEmail & vbcrlf
MyBody = MyBody & "Comments: "& vbcrlf
MyBody = MyBody & MyComments

Set MyMail = CreateObject("CDO.Message")
MyMail.From = "You@YourDomain.com"
MyMail.To = "YouAgain@YourOtherAddress.com"
MyMail.Subject = "Test message using CDOSYS"
MyMail.Body = MyBody
MyMail.Send
Set MyMail= nothing
Response.Write("Your e-mail has been sent")
%>
Youre Mailform should be something like this, I called it MailForm.asp:

Code:
<form action="MailScript.asp" method="post" name="MyForm" id="MyForm">
<strong>Name</strong><br>
<input name="name" type="text" id="name" size="30"><br>

<strong>Email</strong><br>
<input name="email" type="text" id="email" size="30"><br>

<strong>Comments</strong><br>
<textarea name="comments" id="comments" cols="28" rows="6" wrap="VIRTUAL"></textarea><br>

<input type="submit" name="Submit" value="Send">
</form>
Make sure that the form fields have the same name as in your mailing script after the code Request.Form(" ....
This script doesn't need any DB. Your server has to accept CDOSYS.

If you want to use CDONTS you just need to change one line of code in your MailScript.asp.
change this
Code:
Set MyMail = CreateObject("CDO.Message")
into this
Code:
Set myMail = Server.CreateObject ("CDONTS.NewMail")

greetz, toth

Last edited by toth; 10-27-05 at 03:43 AM.
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
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

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

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
New to ASP : dinalsi ASP 2 06-06-05 08:03 AM
ASP and JMAIL bdannels ASP 1 01-04-05 07:36 AM
ASP Programmer Required (PAID) Steelman Job Offers & Assistance 2 11-19-04 01:26 AM
save asp as html clintwolf12 ASP 0 10-29-04 10:05 AM
PHP integrated with ASP Mikeirv PHP 7 05-25-04 05:00 AM


All times are GMT -5. The time now is 03:36 PM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.