We have a simple form that validates and sends on to the appropriate person. The form works fine on our testing server, but not on the live sever. I am stumped.
On the live server I get the message "There was an error sending your email. Please try again later." This leads me to believe it is in the below portion of code.
if ($valid) {
// process the form
require_once('../includes/email.php');
if ($process_success) {
foreach($form_fields as $key=>$value) {
// clear it out
${$value} = '';
}
$new_location = 'http://statefarmstage.ddbchicago.net/redportfolio/thanks_for_asking/';
header("Location: " . $new_location);
exit;
} else {
$attention_msg = 'There was an error sending your email. Please try again later.';
$detail_msg[] = '';
}
} else {
if (count($detail_msg) > 1) {
$single_plural = 's';
} else {
$single_plural = '';
}
$attention_msg = 'Please correct the following error' . $single_plural . ':';
$detail_msg[] = '';
}
} else {
foreach($form_fields as $key=>$value) {
// clear it out
${$value} = '';
$v{$value} = TRUE;
}
$valid = TRUE;
$process_success = FALSE;
$attention_msg = '';
$detail_msg = array('');
}