Niente da fare, ho provato di nuovo, ma non funziona proprio.
Allora:
file html
Codice HTML:
<form method="post" action="index.html">
<div style="font-size:12px">
<label>Nome</label>
<input name="name" placeholder="Type Here">
<label>Cognome*</label>
<input name="surname" placeholder="Type Here" required/>
<label>Telefono</label>
<input name="tel" placeholder="Type Here">
<label>Email*</label>
<input name="email" type="email" placeholder="Type Here" required/>
<label>Messaggio*</label>
<textarea name="message" placeholder="Type Here" required/></textarea>
<input id="submit" name="submit" type="submit" value="Submit">
</div>
</form>
File php
Codice PHP:
<?php
$header = "From: .. <..>\n";
$header .= "MIME-Version: 1.0\n";
$header .= "Content-Type: text/html; charset=\"iso-8859-1\"\n";
$header .= "Content-Transfer-Encoding: 7bit\n\n";
$to = "Pippo <xxx@gmail>";
$subject = 'Da Pippo.it';
$body = "BLA bla bla bla bla bla bla bla bla bla bla bla bla bla";
$from = "From: [email]pippo@gmail.com[/email]";
if(!(@mail($to, $subject, $body, $from))){
print "<H5>Invio della email fallito.</H5>";}
?>
Ho provato anche con indirizzi mail diversi da gmail, ma non funziona lo stesso.
Grazie!