Outlook (Office 365)在转发或回复电子邮件时剥离HTML元素类和ID属性



我通过PowerShell脚本创建了一个HTML模板邮件,并将其发送给收件人客户端。当客户端回复或转发自定义HTML电子邮件模板时,使用Outlook Office 365桌面客户端时,所有HTML元素class和ID属性都会自动删除。

然而,当我在Outlook Web App浏览器中尝试时,一切都很顺利。有人能帮帮我吗?

下面是通过代码生成的HTML示例:
<center>
<table width="900px" cellspacing="5" cellpadding="5" style="border:1px solid #f0f0f0">
<tbody>
<tr>
<td><img width="200" height="100" src="https://www.sessionm.com/wp-content/uploads/2020/03/*****.png"></td>
<td style="font-weight:bold;font-size:20px">*********** <br>
<span style="font-size:16px;color:blue">Update Tech Panel Data</span></td>
</tr>
<tr>
<td colspan="2"><br>
Hi <strong>*****</strong>, <br>
<br>
Thank you for nominating yourself to be part of the interview process held on <strong>
07/24/2021 18:30:00</strong>. Your general detail inside the system is shown below the table.
<br>
<br>
<table style="border-collapse:collapse;width:800px;">
<tbody>
<tr>
<td style="padding:5px 1px;background-color:#f0f0f0;border:1px solid #000;font-weight:bold">
PSID</td>
<td style="padding:5px 1px;background-color:#f0f0f0;border:1px solid #000;font-weight:bold">
Name</td>
<td style="padding:5px 1px;background-color:#f0f0f0;border:1px solid #000;font-weight:bold">
Client</td>
<td style="padding:5px 1px;background-color:#f0f0f0;border:1px solid #000;font-weight:bold">
Email ID</td>
<td style="padding:5px 1px;background-color:#f0f0f0;border:1px solid #000;font-weight:bold">
Client Email ID</td>
</tr>
<tr>
<td style="padding:5px 1px;border:1px solid #000;">****</td>
<td style="padding:5px 1px;border:1px solid #000;">****</td>
<td style="padding:5px 1px;border:1px solid #000;">****</td>
<td style="padding:5px 1px;border:1px solid #000;">*****</td>
<td style="padding:5px 1px;border:1px solid #000;">****</td>
</tr>
</tbody>
</table>
<br>
Request you to please provide your input details in below table by replying to this email chain. Also, please
<strong>attach necessary documents</strong> which are related to the interview process.
<br>
<br>
<table style="border-collapse:collapse;width:800px;">
<tbody>
<tr>
<td style="padding:5px 1px; background-color:#f0f0f0; border:1px solid #000; font-weight:bold; width:400px">
Interview Taken in Jul Month</td>
<td title="titlelayout_getInterviewCountForMonth" class="classlayout_getInterviewCountForMonth" style="padding:4px 1px; border:1px solid #000; font-family:'stylelayout_getInterviewCountForMonth'">
</td>
</tr>
</tbody>
</table>
<br>
</td>
</tr>
<tr>
<td colspan="2">Thanks And Regards,<br>
<strong>****</strong>
<table style="color:#fff; display:none;visibility:hidden;width:0;height:0;opacity:0">
<tbody>
<tr>
<td title="titlelayout_spID" class="classlayout_spID">***`enter code here`</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</center>

感谢

Outlook使用Word(或者是Word-light编译成一个dll)来显示和编辑HTML消息,所以你的HTML会被转换成DOCX(或内部的东西),然后再回到HTML。

最新更新