mulligan
08-12-2006, 11:44 AM
I keep getting these oddball emails being sent to me from our contacts page.
Here is a sample:
From: using7695@removed.xxx
Interests:
Subject: baconContent-Type: multipart/alternative; boundary=609287ad2517bcf115cd04b0767bcbb6Subject: curing requires immersing the ham in a brine for anbcc: buletmann@aol.com--609287ad2517bcf115cd04b0767bcbb6Content-Transfer-Encoding: 7bitContent-Type: text/plainusing a much higher temperature where the meat is partially cooked over a few days. *** produced bacon is cooked--609287ad2517bcf115cd04b0767bcbb6Content-Transfer-Encoding: 8bitContent-Type: text/plainwet dry curing recipe 3 xternal links edit ational regulation of ham production ach country that produces ham has its own regulations. edit rance ayonne am e--609287ad2517bcf115cd04b0767bcbb6--
Message: using7695@removed.xxx
Here is my php code... I have regex setup for subject etc... but they still seem to be able to send mail.
Any ideas why this is happening??
<?
function format_inputs($input) {
$input = str_replace("\n", "", $input);
$input = str_replace("\r", "", $input);
$input = str_replace("%0a", "", $input);
$input = str_replace("%0d", "", $input);
$input = trim(htmlentities($input));
return $input;
}
$email=$_POST["email"];
if (eregi("\r",$email) || eregi("\n",$email)){
die("Please do not spam. Attempt has been logged.");
}
else{
$interests=format_inputs($_POST['interests']);
$subject=format_inputs($_POST['subject']);
$message=format_inputs($_POST['message']);
if($message == ''){
die("Message was not entered");
}
if($subject == ''){
die("Subject was not entered");
}
if($email == ''){
die("Email was not entered");
}
$to="fake@email.com";
$message="\n\n From: $email\n Interests: $interests\n Subject: $subject \n Message: $message\n\n";
if(mail($to,$interests,$message,"From: $email\n")) {
echo " Thank you for contacting us. You are now being redirected to the main page.";
} else {
echo " There was a problem sending the mail. Please check that you filled in the form correctly.";
}
?>
Here is a sample:
From: using7695@removed.xxx
Interests:
Subject: baconContent-Type: multipart/alternative; boundary=609287ad2517bcf115cd04b0767bcbb6Subject: curing requires immersing the ham in a brine for anbcc: buletmann@aol.com--609287ad2517bcf115cd04b0767bcbb6Content-Transfer-Encoding: 7bitContent-Type: text/plainusing a much higher temperature where the meat is partially cooked over a few days. *** produced bacon is cooked--609287ad2517bcf115cd04b0767bcbb6Content-Transfer-Encoding: 8bitContent-Type: text/plainwet dry curing recipe 3 xternal links edit ational regulation of ham production ach country that produces ham has its own regulations. edit rance ayonne am e--609287ad2517bcf115cd04b0767bcbb6--
Message: using7695@removed.xxx
Here is my php code... I have regex setup for subject etc... but they still seem to be able to send mail.
Any ideas why this is happening??
<?
function format_inputs($input) {
$input = str_replace("\n", "", $input);
$input = str_replace("\r", "", $input);
$input = str_replace("%0a", "", $input);
$input = str_replace("%0d", "", $input);
$input = trim(htmlentities($input));
return $input;
}
$email=$_POST["email"];
if (eregi("\r",$email) || eregi("\n",$email)){
die("Please do not spam. Attempt has been logged.");
}
else{
$interests=format_inputs($_POST['interests']);
$subject=format_inputs($_POST['subject']);
$message=format_inputs($_POST['message']);
if($message == ''){
die("Message was not entered");
}
if($subject == ''){
die("Subject was not entered");
}
if($email == ''){
die("Email was not entered");
}
$to="fake@email.com";
$message="\n\n From: $email\n Interests: $interests\n Subject: $subject \n Message: $message\n\n";
if(mail($to,$interests,$message,"From: $email\n")) {
echo " Thank you for contacting us. You are now being redirected to the main page.";
} else {
echo " There was a problem sending the mail. Please check that you filled in the form correctly.";
}
?>
