I'm sure this is a very basic coldfusion question for you - cfmail, syntax related

chandldj
chandldj used Ask the Experts™
on
This is the following script I have for "mailto.cfm". It works fine except the <cflocation> part. I am 100% certain that the form is set up correctly and that the variables are correct - i'm sure it is just a syntax problem. I have several different websites with several different extensions and I have reasons that I have set it up the way I have. Nonetheless, if the website i need redirection to through this cfmail page is "page.com"

then

form.title = "page"

and

form.ext = "com"

and the . will be missing - so as you see below I put <cflocation url="http://www.#form.title#.#form.ext#">

when I try to submit the form it stops on this page "mailto.cfm" and I get the I.E. error "The page cannot be displayed".

here is the full code...
-----------------------------------
<cfmail
from="admin@home-search-experts.com"
to="info@home-search-experts.com"
subject="HSE CONTACT EMAIL"
server="63.119.175.39">

Product: #form.page#

Name: #form.name#
City: #form.city#
Province / State: #form.province#
Phone Number: #form.phone#
Email Address: #form.email#
Comments / Questions: #form.comments#

</cfmail>
<cflocation url="http://www.#form.title#.#form.ext#">
--------------------------------------------------

Please help. Thank you,


Dean
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Commented:
are you sure that when you submit the form, http://www.#form.title#.#form.ext# is a valid url?  i just tested it and it works fine with a valid url, but will not work with an invalid one.

Commented:
also, if you are positive the url is valid, what leads you to that conclusion?

Commented:
can u print teh values of all form variables on a page & paste it here

i guess some of the values are not getting defined & is throwing up !

let me know

K'Rgds
Anand

Commented:
try this simple debug

right above your cflocation put this:

<cfoutput>If this were working I would send you here: "http://www.#form.title#.#form.ext#"</cfoutput>
<cfabort>

CJ

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial