在电子邮件中嵌入HTML表

在电子邮件中嵌入HTML表

问题描述:

是否可以发送表格(以html编码)作为电子邮件的正文,以便收件人能够查看(解析和显示)该表格。

Is it possible to send a table (coded in html) as the body of an email so that the recipient is able to view the table (parsed and displayed).

例如,我希望能够将其作为电子邮件的正文发送:

For example, I want to be able to send this as the body of an email:

<html>
    <table>
        <tr> 
            <td> col1 </td> 
            <td> col2 </td> 
        </tr> 
    </table> 
</html>

使收件人看到 col1 col2

我在某些地方读到不可能,并且必须使用电子邮件服务提供的表创建器,但是我d只是想确认是否有可能。

I've read in some places that it's not possible and that I must use the table creator provided by the email service, but I'd just like to confirm to see if it's possible or not.

您可以发送带有 table 包含数据。只要确保您将其样式设置为包含数据的表即可。以此为例。

You can send an email with a table inside it containing data. Just make sure you style it as a 'table containing data'. Use this as an example.

这是在构建电子邮件。

<html>
<table width="600" style="border:1px solid #333">
  <tr>
    <td align="center">head</td>
  </tr>
  <tr>
    <td align="center">
      body 
      <table align="center" width="300" border="0" cellspacing="0" cellpadding="0" style="border:1px solid #ccc;">
        <tr>
          <td> data </td>
          <td> info </td>
        </tr>
      </table>
    </td>
  </tr>
</table>
</html>