PHP 메일러를 사용하여 HTML 이메일을 보내고 있습니다. 그러나, 모든 패딩, 여백, div 크기 등 아래의 이메일을 보낼 때 (Outlook에서) 사라 졌 어 요. 내 Gmail 계정을 살펴 본다면 괜찮아 보입니다. 아이폰 메일 앱에서 여백 등도 사라졌습니다.phpmailer를 통해 html을 보냅니다.
<div id="wrapper" style="width: 100%;">
<table width=600 style="margin:0 auto">
<tbody>
<tr>
<td>
<div id="Banner" style="
max-width: 640px;
margin: 0 auto;
min-height: 60px;
background-color: #75dcfc;
width: 100%;
">
<div class="center" style="margin: auto;text-align: center;">
<img src="logourl" alt="test" style="max-width: 450px;padding-top: 0px;width: 50%;">
</div>
</div>
<div id="box" style="max-width: 640px;width: 100%;background-color: white;color: #696969;border-style: solid;border-width: 0px;text-align: center;border-color: #d3d3d3;margin-left: auto;margin-right: auto;overflow: hidden;padding: 0px;border-style: solid;height: 500px">
<div id="personalmsg" style="width: 100%;text-align: center;font-size: 22px;margin-left: auto;margin-right: auto;max-width: 400px;padding: 0px;">
<p style="text-align: left;font-size: 17px;margin-top: 50px; color: #000;font-weight: normal;font-style: normal;">hello</p>
</div>
</div>
<h2 id="link" style="text-align: center;max-width: 640px;margin: 0 auto;background-color: #75dcfc;padding-top: 15px;padding-bottom: 15px;width: 100%;"><a href="website" style="color: #fff;text-decoration: none;">Visit us</a></h2>
</td>
</tr>
</tbody>
</table>
</div>
본인은 인라인 CSS 만 사용하고 있습니다. 그러나 나는 내가 잘못하고있는 것을 얻지 못한다. 아마 내가 이메일을 보내는 방법을 보여주는 데 도움이 될 것입니다 :
$mail = new PHPMailer;
$mail->setFrom('[email protected]');
$mail->addAddress($email);
$mail->Subject = "Your Email";
$mail->Body = $html;
$mail->isHTML(true);
try {
$mail->Send();
}
catch (Exception $e) {
}
$ html은 HTML로 문자열을 보유하고 있습니다.
나는
전체 HTML 마크 업을 사용하고 있는지 확인하십시오. 그것은 당신이 게시 한 것에 대한 것이 아닌, 여기있는 경우에는 보이지 않습니다. 그리고/또는 Outlook에서 로컬 문제 일 수 있습니다. –