我正在使用phpmailer发送html-templates。 遗憾的是外部图像没有显示在某些电子邮件客户端上(例如雷鸟) (不是它不是客户端。没有标记为垃圾邮件和图像启用。其他邮件也可以显示图像)
phpmailer部分:
$mail = new PHPMailer;
$mail->CharSet = 'utf-8';
$mail->SetLanguage('de', $path.'email/');
$body = file_get_contents($path.'email/email-template.html');
$replacer = array('...
img src="http://host.com/email/image.png">
...
style="background-image:url(http://host.com/email/image2.png);background-repeat:repeat-x;background-position:top left;"
...
', '{{2}}', '{{3}}');
$toreplace = array($1, $2, $3);
$body = str_replace($replacer, $toreplace, $body);
$mail->From = 'noreply@host.com';
$mail->FromName = 'noreply@host';
$address = $empfaenger;
$mail->AddAddress($address, $name);
$mail->Subject = $betreff;
$mail->IsHTML(true);
$mail->Body = $body;
html-template:
{{1}}
我做错了什么?