Click to See Complete Forum and Search --> : I'm New To Forms.


comiddle
09-09-2003, 01:43 PM
When submitted, an alert pops up saying

"This form is being submitted using e-mail.
Submitting this form will reveal your e-mail address to the recipient and will send the form data without encrypting it for privacy.
You may continue or cancel this operation.

[Ok] [Cancel]"

I don't want this. I want my form submitted instantly and to send the user to a confirmation page.

Can you help?

Here's what I have.
Primitive, yes. But I'm new at this stuff...

<FORM METHOD="POST" ACTION="mailto:colingmiddleton@hotmail.com">
<TEXTAREA NAME="Box 1" ROWS=20 COLS=80>Text Here, Then Submit.
</TEXTAREA>
<INPUT TYPE="submit" VALUE="Submit" NAME="B1">
</FORM>

CyCo
09-09-2003, 01:54 PM
...then you need to use a server-side language to process mail...

comiddle
09-09-2003, 01:55 PM
Hmm, ok.
I'll have to check for a tutorial on that one.

KBoek
09-10-2003, 06:03 AM
A better way to send emails from your form is to use a mail object on your webserver. If your webserver supports ASP (at least Windows IIS webservers do), you can try the following:

Set the action of your form to a seperate ASP file, eg. sendmail.asp by using: <FORM method="POST" action="sendmail.asp">

Then, create a seperate file, name it sendmail.asp and enter this code in it:


<%@ Language=VBScript %>

<%
'Get the text from the former page and enter it into a variable
BodyText = Request.Form("Box 1")

'Create the mail object using CDONTS
Dim ObjNewMail
Set ObjNewMail = Server.CreateObject("CDONTS.Newmail")

'Set the values of the variables for the object
ObjNewMail.From = "sender@domain.tld"
ObjNewMail.To = "recipient1@domain.tld"; "recipient2@domain.tld"; "morerecipients@domain.tld"
ObjNewMail.Subject = "New Subject"
ObjNewMail.Body = BodyText

'Send the email
ObjNewMail.Send

'Empty the variables
Set ObjNewMail = Nothing

'after the mail has been sent, redirect the user to another page (or back to your main page)
Response.Redirect("ThankYou.asp")

%>

Webskater
09-10-2003, 08:23 AM
Just a tip. You need the make sure the mail service is started on your web server or the CDONTs object is not created.