I have my forum in the root and a subdomain that has another non vb site. In that subdomains folder, I have the following simple send mail .php file:
The URL is Jason Perry LLC
<?php
/* Simple Mail Routine.
Should send a mail with all the information to the target listed.
Check the //EDIT lines for things that need to be changed before implementation.
INPUT objects in FORMS with names including 'hide_' will not be included in the e-mail;
Everything else shows up in the e-mail in "Formatted Field Name: Value" format.
Formatted Field Name is basically the name of the field, with underscores replaced by spaces and each word
uppercase (first).
*/
$textstring = '';
$htmlstring = '';
$emailSender = $_POST['Email_Address'];
foreach ($_POST as $key => $value){
if (!stristr($key, 'hide_') && !stristr($key, 'submit')){
$key = str_replace('_', ' ', $key);
$key = ucfirst($key);
$htmlstring .= "<B>{$key}</B> : $value <BR>";
$textstring .= "$key : $value \n\n";
}
}
if ($_POST){
$mail_from = isset($_POST['Email_Address']) ? $_POST['Email_Address'] : 'Simple Web Design SF Inquiry Form';
$sender_name = $emailSender;
$mail_subject = isset($_POST['hide_subject']) ? $_POST['hide_subject'] : $mailSubject;
$mail_to = $mailRecipient;
//EDIT - change the following two 'default' redirect pages.
$page_redirect = isset($_POST['hide_redirect']) ? $_POST['hide_redirect'] : 'ty.html';
$page_error = isset($_POST['hide_errorpage']) ? $_POST['hide_errorpage'] : 'error.html';
$mail_headers = "MIME-Version: 1.0\nContent-Type: text/html;charset=iso-8859-1\nFrom: $sender_name\n";
//EDIT - change this from $htmlstring to $textstring for text-formatted email.
if (mail($mail_to, $mail_subject, $htmlstring, $mail_headers)){
echo "<META HTTP-EQUIV='Refresh' CONTENT='0; URL=$page_redirect'>";
} else {
header("Location: {$page_error}");
}
}
?>
It doesn't work anymore, I am not sure if it has not been working since vBSEO install or is unrelated. My question is, does anyone know why vBSEO might cause this to not work?
Thanks in advance.



LinkBack URL
About LinkBacks





Reply With Quote