【发布时间】:2022-02-12 07:24:47
【问题描述】:
在我的 node js 应用程序中,我发送了一封电子邮件。我将 db 中的 html 内容作为 string 并用动态值替换一些变量并将其作为邮件发送。当邮件到达 gmail 时,它看起来很完美。但它在 outlook 中被毁了。
这是我来自数据库的 html 内容。
<html>
<body>
<table border="0" cellspacing="0" cellpadding="0" style="max-width:600px">
<tbody>
<tr height="15"></tr>
<tr>
<td>
<table bgcolor="#007bff" width="100%">
<tbody>
<tr>
<td height="45px" colspan="3"></td>
</tr>
<tr>
<td width="30"></td>
<td style="font-size:24px;color:#ffffff;line-height:1">###emailSubject###</td>
<td width="30"></td>
</tr>
<tr td height="20px" colspan="3"></tr>
</tbody>
</table>
</td>
</tr>
<tr>
<td>
<table bgcolor="#FAFAFA" width="100%">
<tbody>
<tr height="15px">
<td width="15px" rowspan="5"></td>
<td></td>
<td width="15px" rowspan="5"></td>
</tr>
<tr>
<td>
<table bgcolor="#FAFAFA" width="100%" cellspacing="0" cellpadding="0">
<tbody>
<tr height="15px">
<td width="20px" rowspan="5"></td>
<td></td>
<td width="20px" rowspan="3"></td>
</tr>
<tr>
<td>
<p>Hi team,</p>
<p>Please find below details of the new request for ###widgetTitle###</p>
<p><strong style="font-size:12px;font-weight:bold">Customer Name: </strong>###customerName###</p>
<p><strong style="font-size:12px;font-weight:bold">Email Address : </strong>###email###</p>
<p><strong style="font-size:12px;font-weight:bold">Contact Number: </strong>###contactNumber###</p>
<p><strong style="font-size:12px;font-weight:bold">Requirement : </strong>###requirement###</p>
<p>Location</p>
<p><strong style="font-size:12px;font-weight:bold">Customer Address : </strong> ###customerAddress###</p>
<p><strong style="font-size:12px;font-weight:bold">Longitude : </strong> ###longitude###</p>
<p><strong style="font-size:12px;font-weight:bold">Latitude : </strong> ###latitude###</p>
</p></p>
<p>Marketing Agent Details</p>
<p><strong style="font-size:12px;font-weight:bold">MA ID : </strong>###maId###</p>
<p><strong style="font-size:12px;font-weight:bold">Name : </strong>###fullName###</p>
<p><strong style="font-size:12px;font-weight:bold">Contact Number : </strong>###maContact###</p>
<p><strong style="font-size:12px;font-weight:bold">Email : </strong>###maEmail###</p>
<p>Contact the team for more information.</p>
<p><strong style="font-size:12px;font-weight:bold">Email address:</strong> sample email (Biz Hrs)</p>
<p><b><i>This is an auto generated email sent by the Project name : do not reply or forward this email. </i></b></p>
<p>Thank You,</p>
<p>Team Project name</p>
</td>
</tr>
<tr height="30px"></tr>
</tbody>
</table>
</td>
</tr>
<tr height="30px"></tr>
</tbody>
</table>
</td>
</tr>
<tr height="15"></tr>
</tbody>
</table>
</body>
</html>
这是我在 gmail 中收到的邮件。
这就是我的观点。
我读了一点,据我所知,这在大部分时间都发生在 Outlook 中。但我找不到任何适合我的解决方案。
我该如何解决这个问题?请帮忙。
【问题讨论】:
标签: html node.js email outlook html-email