Mandando e-mail como SPAM
estava lendo quais as causas do e-mail pode ser considerado SPAM, e umas delas é a falta de remetente,e acho q isso q esta acontecendo comigo, mas ñ sei pe esta acontecendo isso em meus e-mails enviados pelo site, veja só o código:
<?php
if(count($_POST)) {
foreach(array('fmail1','fmail2','fmail3','fmail4','email','name','comentario') as $key) $_POST[$key] = strip_tags($_POST[$key]);
if(!is_secure($_POST)) { die("Hackers begone");}
$emailto = "contato@bizoovale.com";
$esubject = "Mais perfil comentado";
$emailtext = "
$_POST[name] indicou um perfil usando o e-mail $_POST[email]
As pessoas recomendadas foram:
$_POST[fmail1]
$_POST[fmail2]
$_POST[fmail3]
$_POST[fmail4]
Perfil recomendado foi:
$_POST[refurl]
E a mensagem foi:
$_POST[comentario]
";
@mail("$emailto", $esubject, $emailtext, "To: $_POST[name]");
$thankyoupage = "#";
$tsubject = "$_POST[name] te deu o Bizoo!";
// Be careful not to change anyt "$_POST[value]" bits
//Coisa do Bruno para deixar mais bonito
$ttext = "
<table width=\"570\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\" align=\"center\"> <tbody><tr> <td colspan=\"3\"><a href=\"$_POST[refurl]\"><img border=\"0\" style=\"display: block;\" alt=\"\" src=\"[http://www.bizoovale.com/site/form/images/index_01.jpg\"](http://www.bizoovale.com/site/form/images/index_01.jpg%5C) /></a></td> </tr> <tr> <td width=\"35\"><img border=\"0\" style=\"display: block;\" alt=\"\" src=\"[http://www.bizoovale.com/site/form/images/01.jpg\"](http://www.bizoovale.com/site/form/images/01.jpg%5C) /></td> <td width=\"485\" valign=\"top\" bgcolor=\"#d3f00e\" style=\"padding-left: 20px; padding-right: 20px; font-family: Verdana,Arial,Helvetica,sans-serif; color: rgb(90, 90, 90);\"><h1 style=\"font-size: 22px;\">$_POST[name] está te passando "O Bizoo"!</h1> <p><br /> $_POST[name] deu uma passadinha no site <a href=\"http://www.bizoovale.com\">BizooVale.com, achou interessante <a href=\"$_POST[refurl]\">esse perfil</a> e resolveu compartilhar com você.<br /> <br /> Deixando a seguinte mensagem: <br /> "<em style=\"font-size: 12px;\">$_POST[comentario]</em>"</p></td> <td width=\"50\"><img border=\"0\" style=\"display: block;\" alt=\"\" src=\"[http://www.bizoovale.com/site/form/images/02.jpg\"](http://www.bizoovale.com/site/form/images/02.jpg%5C) /></td> </tr> <tr> <td colspan=\"3\"><img style=\"display: block;\" alt=\"\" src=\"[http://www.bizoovale.com/site/form/images/index_05.jpg\"](http://www.bizoovale.com/site/form/images/index_05.jpg%5C) /></td> </tr> <tr> <td colspan=\"3\"><img style=\"display: block;\" alt=\"\" src=\"[http://www.bizoovale.com/site/form/images/index_06.jpg\"](http://www.bizoovale.com/site/form/images/index_06.jpg%5C) /></td> </tr> </tbody></table>
";
@mail("$_POST[fmail1],$_POST[fmail2],$_POST[fmail3],$_POST[fmail4],$_POST[comentario]", "$tsubject", "$ttext", "Content-type: text/html; charset=iso-8859-1\n FROM: $_POST[email]");
After submission, the thank you page
header("Location: $thankyoupage");
exit;
}
Nothing further can be changed. Leave the below as is
function is_secure($ar) {
$reg = "/(Content-Type|Bcc|MIME-Version|Content-Transfer-Encoding)/i";
if(!is_array($ar)) { return preg_match($reg,$ar);}
$incoming = array_values_recursive($ar);
foreach($incoming as $k=>$v) if(preg_match($reg,$v)) return false;
return true;
}
function array_values_recursive($array) {
$arrayValues = array();
foreach ($array as $key=>$value) {
if (is_scalar($value) || is_resource($value)) {
$arrayValues[] = $value;
$arrayValues[] = $key;
}
elseif (is_array($value)) {
$arrayValues[] = $key;
$arrayValues = array_merge($arrayValues, array_values_recursive($value));
}
}
return $arrayValues;
}
?>
Desde já muito obrigadoDiscussão (2)
Carregando comentários...