开发者

Emails sent from PHP not arriving to non-gmail.com addresses

I have a problem开发者_Go百科 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 <matteo@frige.it>\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!";
}


This one is a quite good article about inline HTML images:

http://www.websiteoptimization.com/speed/tweak/inline-images/

Hope it helps.


Most probably images are not embedded properly. In Gmail it works, since it automatically previews attachments.


Is your variable for the image a full url like "http://www.somesite.com"

What happens when you view source on non-gmail email clients?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜