【问题标题】:How to send Outlook email with HTML content如何发送带有 HTML 内容的 Outlook 电子邮件
【发布时间】:2014-12-16 13:34:33
【问题描述】:

谁能帮助我如何使用 Microsoft Outlook 2010 发送带有 html 内容(谷歌图表)的电子邮件。

以下是 Google Charts 的示例 html 内容。

<html>
<head>
    <script type="text/javascript" src="https://www.google.com/jsapi"></script>
    <script type="text/javascript">
     google.load("visualization", "1", {packages:["corechart"]});
      google.setOnLoadCallback(drawChart);
      function drawChart() {

        var data = google.visualization.arrayToDataTable([
          ['Task', 'Hours per Day'],
          ['Work',     11],
          ['Eat',      2],
          ['Commute',  2],
          ['Watch TV', 2],
          ['Sleep',    7]
        ]);

        var options = {
          title: 'My Daily Activities'
        };

        var chart = new google.visualization.PieChart(document.getElementById('piechart'));

        chart.draw(data, options);
      }
    </script>
  </head>
 <body>
    <div id="piechart" style="width: 900px; height: 500px;"></div>
  </body>
</html>

【问题讨论】:

    标签: html-email outlook-2010


    【解决方案1】:

    Outlook 对象模型为其项目提供HTMLBody 属性。因此,您可以将属性设置为 HTML 标记,然后发送邮件项。

    您可以在How To: Create and send an Outlook message programmatically 文章中找到示例代码。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2014-07-13
      • 2014-06-02
      • 1970-01-01
      • 1970-01-01
      • 2014-11-18
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多