Moderators: Derry, Goldie, Harpo
Go
New
Find
Notify
Tools
Reply
  
-star Rating Rate It!  Login/Join 
Working Mechanic
Posted
Hi - I created the form in webdesigner and wrote the SendMail script to accompany. I've done the same script before for other forms with no problems but for some reason, this one is not sending the info on to the designated email. It does redirect to the 'thanks.html' page. Can you take a look to see if you see anything? Thanks, Debra

http://www.krystalq.com/Contact_Us.html
 
Posts: 35 | Registered: September 15, 2008Reply With QuoteEdit or Delete MessageReport This Post
Guru 'Geezer' Mechanic
Picture of larryd
Posted Hide Post
Since the SendMail script is redirecting to the thank you page, we can assume that you have php enabled and the script is working, if only partially.

I did not see in your form any text field that would be used as a recipient for the email. If you did not provide this info inside the SendMail script, then the script's mail() function is missing a vital parameter to work correctly.
 
Posts: 5082 | Registered: December 03, 2006Reply With QuoteEdit or Delete MessageReport This Post
Working Mechanic
Posted Hide Post
This is the Script:

<?php
$ForwardTo="info@krystalq.com";
$contact=$_REQUEST['CONTACT'];
$street=$_REQUEST['STREET'];
$town=$_REQUEST['ADDRESS'];
$zip=$_REQUEST['ZIP'];
$event=$_REQUEST['EVENT'];
$date=$_REQUEST['DATE'];
$guests=$_REQUEST['GUESTS'];
$email=$_REQUEST['EMAIL'];
$phone=$_REQUEST['PHONE'];
$special=$_REQUEST['SPECIAL'];
$entry = "Contact: $contact\n\r";
$entry .= "Street: $street\n\r";
$entry .= "Town: $address\n\r";
$entry .= "Zip: $zip\n\r";
$entry .= "Event: $event\n\r";
$entry .= "Date: $date\n\r";
$entry .= "Guests: $guests\n\r";
$entry .= "Email: $email\n\r";
$entry .= "Phone: $phone\n\r";
$entry .= "Special:\n\r".$_REQUEST['SPECIAL'];
mail($ForwardTo, "inquiry", $entry, "From: $email");
header("Location: thanks.html");
?>

Isn't the second line ($ForwardTo="info@krystalq.com"Wink the recipient email? thanks
 
Posts: 35 | Registered: September 15, 2008Reply With QuoteEdit or Delete MessageReport This Post
Guru 'Geezer' Mechanic
Picture of larryd
Posted Hide Post
Yes, $ForwardTo is being set to the recipent address.

I did not see anything wrong with the script, so the problem must lie with the way your host is connecting to the mail server via the mail() function.

First, are you sure that the recipient email address is valid and set up with the host correctly?

Second, check you host's FAQs about form mail scripts and/or using the mail function. (BTW, who is your host?) Some hosts require a "read" of the recipient's in-box before an email can be sent; this is done to prevent spamming. Other hosts ignore the "From" parameter and instead use the email address set up with the user's account (GoDaddy does this); if an invalid or no email is set up, no email is sent.
 
Posts: 5082 | Registered: December 03, 2006Reply With QuoteEdit or Delete MessageReport This Post
Working Mechanic
Posted Hide Post
the host is yahoo.
 
Posts: 35 | Registered: September 15, 2008Reply With QuoteEdit or Delete MessageReport This Post
Guru 'Geezer' Mechanic
Picture of larryd
Posted Hide Post
I found this link in the Yahoo Small Business Help section (I assume you are using their small business service). Apparently you need to "complete the PHP/Perl Mail Setup process" via your control panel ("PHP/Perl Mail" link on the Create & Update or Index tabs").

I also saw in the help that you are limited to 250 emails a day and any emails generated via your form over this limit are thrown away. This may not effect your business, but keep it in mind.
 
Posts: 5082 | Registered: December 03, 2006Reply With QuoteEdit or Delete MessageReport This Post
  Powered by Eve Community  
 


™ & © 1998 - 2008, Virtual Mechanics Inc. All rights reserved.