Inserito anche un fittizio mittente, esito MAIL INVIATA ma zero mail e zero spam.
Riporto il codice di seguito:
Codice PHP:
<?
$nome=$_POST ['nome'] ;
$citta=$_POST ['citta'] ;
$indirizzo=$_POST ['indirizzo'] ;
$telefono=$_POST ['telefono'] ;
$email=$_POST ['email'] ;
$richiesta=$_POST ['richiesta'] ;
$mail= "rrrrr@rrrrrr.com" ;
$subject = "informazioni";
$headers="From: [email]mittente@mail.it[/email]";
$body = "Contenuto del modulo:\n\n"; $body .= "Nome cognome: " . trim(stripslashes($_POST["nome"])) . "\n"; $body .= "citta: " . trim(stripslashes($_POST["citta"])) . "\n"; $body .= "telefono: " . trim(stripslashes($_POST["telefono"])) . "\n"; $body .= "email: " . trim(stripslashes($_POST["email"])) . "\n"; $body .= "Indirizzo: " . trim(stripslashes($_POST["indirizzo"])) . "\n"; $body .= "Richiesta: " . trim(stripslashes($_POST["richiesta"])) . "\n";
$send_mail=mail($mail,$subject,$body,$headers);
if($send_mail)
{
echo"Mail inviata";
}
else{
echo "Mail non inviata";
}
?>
Mi permetto di aggiungere che anche gli esempi forniti dal gestore dello spazio danno come esito MAIL INVIATA ma in effetti non "consegnano" alcun messaggio.
Che sia una impostazione particolare del server? In questo caso come verificarla?