Click to See Complete Forum and Search --> : New to coldfusion ... help


mfrail
03-18-2008, 11:38 PM
I have a form. It is a simple contact us form that I want to post to a .cfm file for e-mail but I get teh following error -

501 Not Implemented
Cannot do POST is supported via CGI/API programs only. with this URL /contact.cfm.

The code of my files is below. Any help would be huge as I am really not familar with coldfusion.

My form -

<!DOCTYPE HTML PUBLIC "-//SoftQuad//DTD HoTMetaL PRO 4.0::19971010::extensions to HTML 4.0//EN"
"hmpro4.dtd">

<HTML>

<HEAD>
<TITLE>Clean View Lawn &amp; Land Inc. Contact Us</TITLE>
</HEAD>

<BODY BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000A0" VLINK="#0000A0"
ALINK="#FFFF00" TOPMARGIN="5">
<TABLE WIDTH="100%" CELLPADDING="0" CELLSPACING="0" BORDER="0"
ALIGN="CENTER">
<TR>
<TD ALIGN="CENTER" VALIGN="TOP">
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" ALIGN="CENTER" WIDTH="540">
<TR>
<TD COLSPAN="2" ALIGN="CENTER" VALIGN="MIDDLE"><IMG SRC="gif/tr.gif" ALT="Clean View Lawn & Land Inc." WIDTH="262" HEIGHT="84" BORDER="0"><IMG SRC="gif/head.gif" WIDTH="90" HEIGHT="90" BORDER="0"><BR>
<IMG SRC="gif/contact.gif" ALT="Contact Us" WIDTH="107" HEIGHT="25" BORDER="0" ALIGN="LEFT"></TD>
</TR>
<TR>
<TD COLSPAN="2" ALIGN="CENTER">
<TABLE BORDER="0" CELLPADDING="2" CELLSPACING="2">
<TR>
<TD><FONT SIZE="-1" FACE="arial"><B>Business Hours:</B> M-F
9-5 PM EST</FONT></TD>
<TD></TD>
</TR>
<TR>
<TD><FONT SIZE="-1" FACE="arial"><B>Phone:</B> (603)433-3045</FONT></TD>
<TD><FONT SIZE="-1" FACE="arial"><B>Fax:</B> (208)975-3788</FONT></TD>
</TR>
<TR>
<TD><FONT SIZE="-1" FACE="arial"><B>Mailing Address:</B> PO
Box 4635<BR>
Portsmouth, NH 03802</FONT></TD>
<TD></TD>
</TR>
<TR>
<TD COLSPAN="2"><FONT SIZE="-1" FACE="arial"><B>Email
Address:</B></FONT> <FONT SIZE="-1" FACE="arial">Sales:
<A HREF="mailto:mike@communicom.net">mike@communicom.net</A></FONT>
</TD>
</TR>
</TABLE>
<FORM ACTION="contact.cfm" METHOD="POST">
<TABLE>
<TR>
<TD VALIGN="MIDDLE" COLSPAN="4"><FONT SIZE="-1" FACE="arial">Fill
out the form below to contact Clean View Lawn &amp; Land Inc.
via email.</FONT></TD>
</TR>
<TR>
<TD VALIGN="MIDDLE"><FONT SIZE="-1" FACE="arial">Name: </FONT></TD>
<TD VALIGN="MIDDLE"><INPUT TYPE="TEXT" NAME="Name" SIZE="20"></TD>
<TD VALIGN="MIDDLE"><FONT SIZE="-1" FACE="arial">Phone:
</FONT></TD>
<TD VALIGN="MIDDLE"><INPUT TYPE="TEXT" NAME="Phone" SIZE="20"></TD>
</TR>
<TR>
<TD VALIGN="MIDDLE"><FONT SIZE="-1" FACE="arial">Email:
</FONT></TD>
<TD VALIGN="MIDDLE"><INPUT TYPE="TEXT" NAME="Email" SIZE="20"></TD>
<TD VALIGN="MIDDLE"><FONT SIZE="-1" FACE="arial">Address:
</FONT></TD>
<TD VALIGN="MIDDLE"><INPUT TYPE="TEXT" NAME="Address" SIZE="20"></TD>
</TR>
</TABLE>
<TABLE ALIGN="CENTER">
<TR>
<TD><FONT SIZE="-1" FACE="arial">City: </FONT></TD>
<TD><INPUT TYPE="TEXT" NAME="City" SIZE="10"></TD>
<TD><FONT SIZE="-1" FACE="arial">State: </FONT></TD>
<TD><SELECT NAME="State" SIZE="1">
<OPTION VALUE="nh">NH</OPTION>
<OPTION VALUE="me">ME</OPTION></SELECT></TD>
<TD><FONT SIZE="-1" FACE="arial">Zip: </FONT></TD>
<TD><INPUT TYPE="TEXT" NAME="Zip" SIZE="10"></TD>
</TR>
<TR>
<TD COLSPAN="6"><FONT SIZE="-1" FACE="arial">Comment(s) :
</FONT><BR>

<TEXTAREA NAME="Comments" ROWS="4" COLS="40"></TEXTAREA></TD>
</TR>
<TR>
<TD COLSPAN="6" ALIGN="CENTER" VALIGN="TOP"><INPUT TYPE="IMAGE" NAME="Image1" BORDER="0" ALT="submit " SRC="gif/submit.gif"></TD>
</TR>
</TABLE></FORM></TD>
</TR>
</TABLE></TD>
</TR>
</TABLE>
</BODY>
</HTML>


My CFM file -

<CFMAIL TO="marc.frail@gmail.com" SUBJECT="Please Contact Me !" FROM="#form.email#">
sales@lawnz.com

Here is my contact information:


Name: #form.Name#
Phone: #form.Phone#
Email: #form.Email#
Address: #form.Address#
City: #form.City#, State: #form.State# Zip: #form.Zip#
Comments: #form.Comments#


</CFMAIL>
<CFLOCATION URL="thankyou.htm">

snarfblat
03-26-2008, 06:39 PM
Sounds like a config problem to me. I just created the files using the code you pasted (verbatim) and submitted the form and got to the Thank You page just fine.

Check your CFAdmin page and be sure your mail server is properly specified... that's the only thing I can think of at the moment. Reply with whatever you find and I can try to help you through it some more.

Rob