| Subject: | ColdFusion contact form by email - please help |
|---|---|
| From: | "jennypretty2" <webforumsuser@xxxxxxxxxxxxxx> |
| Date: | Mon, 28 Jul 2008 16:44:04 +0000 (UTC) |
| Newsgroups: | macromedia.coldfusion.cfml_general_discussion |
Hello,
I tried to create a contact form, using email to send, and I have some issues
and questions:
1. I like to have a message "Your form has been sent", but it shows the blank
after user submited the form.
2. If user enter her email address, this form will send to her email address
and me, but it does not send to her email address.
Can anyone please take a look at my code below?
Why I don't get the output (result) I like to have?
Thanks very much.
Jenny.
<cfif IsDefined("form.Subject")>
<cfprocessingdirective suppresswhitespace="no">
<cfmail subject="#form.Subject#" from="#form.From#" to="test@xxxxxxxx" >
This is a message from that form...
#form.Message#
</cfmail>
</cfprocessingdirective>
<cfelse>
<cfform action="#CGI.SCRIPT_NAME#" method="post" name="frmName">
name <cfinput type="text" name="Name" size="20"><br />
email <cfinput type="text" name="Email" size="20"><br />
Subject <cfinput type="text" name="Subject" size="20"><br />
Message <textarea name="Message" cols="30" rows="3" ></textarea><br />
<input type="submit" value="Submit it" />
</cfform>
<cfif isDefined("FORM.Name")>
<cfmail subject="#form.Subject#" from="#form.From#" to="#Email#" >
</cfif>
<cfif isDefined("FORM.Submit")>
<p>Your message has been sent</p>
<cfelse>
<cflocation addtoken="no" url="survey2.cfm">
</cfif>
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Re: Response time is very high, Kronin555 |
|---|---|
| Next by Date: | Re: SQL injection embeded .js file to execute CF hack, ajdove |
| Previous by Thread: | how to use REFind, dongzky |
| Next by Thread: | Re: ColdFusion contact form by email - please help, Dan Bracuk |
| Indexes: | [Date] [Thread] [Top] [All Lists] |