Ho un semplice script dove l'utente inserisce l'email o cmq un messaggio e poi mi faccio spedire un'email a me con quanto scritto dall'utente.
L'email mi arriva però la
if(@mail($email, $subject, $messaggio, $header))
mi viene FALSA e in più mi viene generata la scritta a video "Who are you" che non avevo mai visto prima...
codice:
<?php if(!isset($_POST['ric_isc']) || $_POST['ric_isc'] == "")
{ echo ("<form ......");
echo ("<input type='text' name='email' size='30'>");
echo ("<input type='submit' value='invioo'>");
echo ("<input type='hidden' name='ric_isc' value='1'></form>");
}
else if($_POST['ric_isc']==1)
{ $ip=$_SERVER['REMOTE_ADDR'];
$email_dest=$_POST['email'];
$header = "From: intestazione <info@miaemail.it>\n";
$boundary = "==String_Boundary_x" .md5(time()). "x";
$header .= "MIME-Version: 1.0\n";
$header .= "Content-Type: multipart/alternative;\n";
$header .= " boundary=\"$boundary\";\n\n";
$subject = "oggetto";
$messaggio .= "--$boundary\n";
$messaggio .= "Content-Type: text/html; charset=\"iso-8859-1\"\n";
$messaggio .= "Content-Transfer-Encoding: 7bit\n\n";
$messaggio .= "<html><body><p/>";
$messaggio .="Richiesta da email: " . $email_dest. " con IP:" . $ip . "<p/></body></html><p/>\n\n";
$messaggio .= "--$boundary--\n";
$email="miaemail@email.it";
if(@mail($email, $subject, $messaggio, $header)) {
echo ("ok");
}
else { echo ("no"); }
}
Potete aiutarmi? grazie