P3k
02-25-2008, 07:55 AM
I use this script for sending email from FLASH pages... But antispam robot that is on sever marked my emails like spam. Where is problem ?
<?
if(!empty($HTTP_POST_VARS['sender_mail']) || !empty($HTTP_POST_VARS['sender_message']) || !empty($HTTP_POST_VARS['sender_subject']) || !empty($HTTP_POST_VARS['sender_name']))
{
$to = "info@whatever.com";
$subject = stripslashes($HTTP_POST_VARS['sender_subject']);
$body = stripslashes($HTTP_POST_VARS['sender_message']) . "\n\n";
$body .= "Items : " .$HTTP_POST_VARS['sender_checkboxes'] . "\n";
$body .= "\n\n______________________________________________ _______\n";
$body .= "Company : " .$HTTP_POST_VARS['sender_comp'] . "\n";
$body .= "Sender : " .$HTTP_POST_VARS['sender_name'] . "\n";
$body .= "Email : " .$HTTP_POST_VARS['sender_mail'] . "\n";
$body .= "Phone : " .$HTTP_POST_VARS['sender_phone'] . "\n";
$body .= "Address : " .$HTTP_POST_VARS['sender_address'] . "\n\n";
$body .= "Question : " .$HTTP_POST_VARS['sender_question'] . "\n";
$body .= "\n\n______________________________________________ _______\n";
$header = "From: " . $HTTP_POST_VARS['sender_name'] . " <" . $HTTP_POST_VARS['sender_mail'] . ">\n";
$header .= "Reply-To: " . $HTTP_POST_VARS['sender_name'] . " <" . $HTTP_POST_VARS['sender_mail'] . ">\n";
$header .= "X-Mailer: PHP/" . phpversion() . "\n";
$header .= "X-Priority: 1";
if(@mail($to, $subject, $body, $header))
{
echo "output=sent";
} else {
echo "output=error";
}
} else {
echo "output=error";
}
?>
And this is reason, that antispam robot send to email :
Analyse: (3.3 points, 3.0 required)
score filtr description
---- ---------------------- -------------------------------------------
2.7 FH_FROMEML_NOTLD E-mail address doesn't have TLD (.com, etc.)
0.5 BAYES_60 BODY: Bayesian spam probability is 60 to 80%
[score: 0.7579]
0.0 SUBJECT_NEEDS_ENCODING SUBJECT_NEEDS_ENCODING
0.1 RDNS_NONE Delivered to trusted network by a host with no rDNS
<?
if(!empty($HTTP_POST_VARS['sender_mail']) || !empty($HTTP_POST_VARS['sender_message']) || !empty($HTTP_POST_VARS['sender_subject']) || !empty($HTTP_POST_VARS['sender_name']))
{
$to = "info@whatever.com";
$subject = stripslashes($HTTP_POST_VARS['sender_subject']);
$body = stripslashes($HTTP_POST_VARS['sender_message']) . "\n\n";
$body .= "Items : " .$HTTP_POST_VARS['sender_checkboxes'] . "\n";
$body .= "\n\n______________________________________________ _______\n";
$body .= "Company : " .$HTTP_POST_VARS['sender_comp'] . "\n";
$body .= "Sender : " .$HTTP_POST_VARS['sender_name'] . "\n";
$body .= "Email : " .$HTTP_POST_VARS['sender_mail'] . "\n";
$body .= "Phone : " .$HTTP_POST_VARS['sender_phone'] . "\n";
$body .= "Address : " .$HTTP_POST_VARS['sender_address'] . "\n\n";
$body .= "Question : " .$HTTP_POST_VARS['sender_question'] . "\n";
$body .= "\n\n______________________________________________ _______\n";
$header = "From: " . $HTTP_POST_VARS['sender_name'] . " <" . $HTTP_POST_VARS['sender_mail'] . ">\n";
$header .= "Reply-To: " . $HTTP_POST_VARS['sender_name'] . " <" . $HTTP_POST_VARS['sender_mail'] . ">\n";
$header .= "X-Mailer: PHP/" . phpversion() . "\n";
$header .= "X-Priority: 1";
if(@mail($to, $subject, $body, $header))
{
echo "output=sent";
} else {
echo "output=error";
}
} else {
echo "output=error";
}
?>
And this is reason, that antispam robot send to email :
Analyse: (3.3 points, 3.0 required)
score filtr description
---- ---------------------- -------------------------------------------
2.7 FH_FROMEML_NOTLD E-mail address doesn't have TLD (.com, etc.)
0.5 BAYES_60 BODY: Bayesian spam probability is 60 to 80%
[score: 0.7579]
0.0 SUBJECT_NEEDS_ENCODING SUBJECT_NEEDS_ENCODING
0.1 RDNS_NONE Delivered to trusted network by a host with no rDNS