我不知道为什么在 MAC OS X (Mail 6.2) 的邮件客户端中,图像显示如下:
和其他邮件客户端,如 gmail、outlook 或 private 图像是正确的,看起来像这样:
phpmailer
require_once 'phpmailer/class.phpmailer.php';
$mail = new PHPMailer(true);
$mail->IsSMTP();
try {
$mail->SMTPDebug = 1;
$mail->SMTPAuth = true;
$mail->Host = "mail.com.mx";
$mail->Port = 587;
$mail->CharSet = "UTF-8";
$mail->Username = "soldier@mail.com.mx";
$mail->Password = "password?";
$mail->SetFrom('no-reply@mail.com.mx', 'MA Consulting');
$mail->Subject = 'Subject';
$message = '<div style="border:solid 1px #427696;font-family:Arial;width:650px">
<table style="background:#799db4;border-bottom:solid 1px #427696;width:650px; padding:5px;">
<tbody>
<tr>
<td>
<div style="padding:30px 30px 0;font-size:30px; height: 65px;">
<a style="text-decoration: none; color: #FFF;" href="iq.com.mx/iq" target="_blank">MA Consulting</a>
</div>
</td>
<td style="vertical-align:middle;text-align:right;padding-right:30px">
<img src="../media/Logo-MA.gif" width="120px" height="93px"/>
</td>
</tr>
</tbody>
</table>
</div>
<!-- more code -->';
$mail->MsgHTML($message);
$mail->AddAddress($email, $name);
$mail->Send();
} catch (phpmailerException $e) {
echo $e->errorMessage();
} catch (Exception $e) {
echo $e->getMessage();
}