I have a problem sending HTML emails from a PHP form.
My goal is to send an email in HTML format with a picture embedded in it. It works perfectly if the destination address is a gmail.com
email, but it doesn't seem to arrive to any other address.
What am I doing wrong?
$header = "From: Private PictureBank MDC <[email protected]>\n";
$header .= "MIME-Version: 1.0\n";
$header .= "Content-Type: text/html;\n";
$messaggio = "<html><body>Galleria Massimo De Carlo<br /><br /><p><b><i>".$titolo.",</i></b> ".$anno."<br />".$dimensioni."</p><img src=\"".$foto."\"></body></html>\n";
$subject = $titolo;
if(!@mail($mail, $subject, $messaggio, $header) ){
$esito= "Errore nell'invio dell'e-mail,<br />riprova reinserendo l'indirizzo mail!";
}else{
$esito = "Email inviata correttamente!";
}