Hi, I am using CF 9 on my localhost, and my mail is not being delivered, and I 
can't figure out why. In my "sendmail.log" I see:
Mail: 'from contact form' From:'[email protected]' To:'[email protected]' 
was successfully sent using mail.hawaii.edu  but the mail is never deleivered, 
there is nothing in the spool or undelievered mail. The form works and is below.

How can I fix this?
thanks,
Johnny






my code
<!--- create captcha --->
<cfif not structKeyExists(application, "captcha")>
        <cfset application.captcha = createObject("component", 
"captchaService").init(configFile="captcha.xml") />
        <cfset application.captcha.setup()>
</cfif>

<cfparam name="form.name" default="">
<cfparam name="form.email" default="">
<cfparam name="form.Message" default="">

<cfset showForm = true>

<cfif structKeyExists(form, "send")>
        <cfset error = "">
        
<cfif not len(trim(form.name))>
  <cfset error = error & "Please include your name<br>">
</cfif>
        
<cfif not len(trim(form.email)) or not isValid("email", form.email)>
  <cfset error = error & "Please include a valid email address<br>">
</cfif>
        
        
<cfif not application.captcha.validateCaptcha(form.hash, form.captcha)>
  <cfset error = error & "You did not match the image text, please try again. 
<br>">
</cfif>
        
<cfif error is "">
  <cfmail to="[email protected]" from="#form.email#" subject="from contact 
form">
        
        This mail was generated by send_mail.cfm!
Your Name - #form.name#
E Mail -  #form.email# 
Your Message - #form.Message# 
        <cfoutput>

  </cfoutput>
        
  </cfmail>
 
  <cfset showForm = false>
 
</cfif>
</cfif>
<cfif showForm>
  <cfif structKeyExists(variables, "error")>
    <cfoutput>
      
      Please correct these errors: 
    </cfoutput>
  </cfif>
</cfif>
<cfif showForm><cfif structKeyExists(variables, "error")><cfoutput>
  
                #error#         </p>
          </cfoutput>
                  </cfif>
        
        <cfoutput>      

        <form action="send_mail.cfm" method="post">
        <table width="600">
                <tr>
                  <td width="289">Your Name</td>
                  <td width="323"><input name="name" type="text" 
value="#form.name#"></td>
                </tr>
                <tr>
                        <td>Your E-mail</td>
                        <td><input name="email" type="text" 
value="#form.email#"></td>
                </tr>
                
                
                <tr>
                  <td>Message</td>
                  <td><textarea name="Message" cols="30" rows="5" 
wrap="physical">#form.Message#</textarea></td>
            </tr>
                <tr>
                        <td>Enter Text Shown in Picture</td>
                        <td>
                        <input name="captcha" type="text">
                        <br>
                        <!--- Captcha --->
                        <cfset captcha = 
application.captcha.createHashReference()>
                        <img src="captcha.cfm?hash=#captcha.hash#">
                        <input name="hash" type="hidden" value="#captcha.hash#" 
/>                      </td>
                </tr><tr>
                <td></td>
                <td><a href="JavaScript:location.reload(true);" 
class="form">Refresh this image</a></td>
</tr>
                        <td>&nbsp;</td>
                        <td><input name="send" type="submit" value="Send"></td>
                </tr>
        </table>
        </form>
     <p>&nbsp;</p>
        </cfoutput>
<cfelse>
                <cfoutput>
        <p>Your information was submitted as follows:</p>    
            Name: #form.name# <br />
            E Mail: <span class="output">#form.email#<br />
            Message: <span class="output">#form.Message# </p> 
                   
          </cfoutput>
</cfif> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-newbie/message.cfm/messageid:4900
Subscription: http://www.houseoffusion.com/groups/cf-newbie/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.15

Reply via email to