require_once "include/class.phpmailer.php";
function protectFromEmailInjection($value) {
$value = str_replace("\n","",$value);
$value = str_replace("\N","",$value);
$value = str_replace("\r","",$value);
$value = str_replace("\R","",$value);
return $value;
}
$name = protectFromEmailInjection($HTTP_POST_VARS['name']);
$phone = protectFromEmailInjection($HTTP_POST_VARS['phone']);
$email = protectFromEmailInjection($HTTP_POST_VARS['email']);
$comment = protectFromEmailInjection($HTTP_POST_VARS['comment']);
$recipient = protectFromEmailInjection($HTTP_POST_VARS['recipient']);
$subject = protectFromEmailInjection($HTTP_POST_VARS['subject']);
$redirect = $HTTP_POST_VARS['redirect'];
$replyto = protectFromEmailInjection($HTTP_POST_VARS['replyto']);
$template = $HTTP_POST_VARS['template'];
$mail = new PHPMailer();
$mail->From = $email; //$replyto;
$mail->FromName = $name;
$mail->AddAddress("request@allcost.info");
$mail->Subject = $subject;
$mail->Body = $comment;
$mail->Send();