我正在发送一封带有 php 的电子邮件。正如我被建议做的那样,我有 3 张图像作为表格背景。问题是我在 Outlook 和 Adroid Gmail 应用程序中查看电子邮件图像时看不到它。
这是使用的代码:
$headers = "From: Furniture \r\n";
$headers .= "Reply-To: info@furniture.com \r\n";
$headers .= "MIME-Version: 1.0\r\n";
$headers .= "Content-Type: text/html; charset=ISO-8859-1\r\n";
$message = '<html><body style="margin: 0;">';
$message .= '<table background="http://mysite.com/emailfinal1.jpg" border="0" width="650" height="506" style="font-family: arial, tahoma;color: black; margin: 0;">
<tr height="308" width="650"><td width="450"></td><td></td></tr>
<tr height="16" width="650" style="font-size:12px;"><td width="450"> </td><td align="left" valign="bottom">'. $first_name . ' ' . $last_name . '</td></tr>
<tr height="16" width="650" style="font-size:12px;"><td width="450"> </td><td align="left" valign="bottom">'. $email . '</td></tr>
<tr height="16" width="650" style="font-size:12px;"><td width="450"> </td><td align="left" valign="bottom">'. $nextdate . '</td></tr>
<tr height="134" width="650"><td width="450"></td><td></td></tr>
</table>
<table background="http://mysite.com/emailfinal2.jpg" border="0" width="650" height="133" style="font-family: arial, tahoma;color: #29468a; margin: 0;">
<tr height="10" width="650"><td width="175"></td><td></td></tr>
<tr height="123" width="650" style="font-size:13px;"><td width="175"> </td><td align="left" valign="baseline"><a href="http://www.mysite.com/unsubscribe.php" target="_blank" style="text-decoration: none;color: #29468a;">UNSUBSCRIBE</a> | <a href="http://www.mysite.com/Terms-And-Conditions.aspx" target="_blank" style="text-decoration: none;color: #29468a;">TERMS & CONDITIONS</a></td></tr>
</table>
<table background="http://mysite.com/emailfinal3.jpg" border="0" width="650" height="60" style="font-family: arial, tahoma;color: #29468a; margin: 0;">
<tr height="20" width="650"><td width="526"></td><td></td></tr>
<tr height="40" width="650" style="font-size:11px;"><td width="526"> </td><td align="left" valign="baseline"><a href="http://www.mysite.com/Contact-Us.aspx" target="_blank" style="text-decoration: none;color: #29468a;">Contact Us</a></td></tr>
</table>';
$message .= "</body></html>";
有什么建议吗?我走错方向了吗?我想让电子邮件默认显示图像。