开发发邮件,outlook2016 收到邮件样式不对

1.在邮件开发邮件发送的时候,可能会嵌套html标签,在主流的浏览器好foxmail显示是正确的,但是在outlook工具上显示不正常,刚开始的时候很好奇,为什么不对呢,经过测试 我们写的邮件的html是html5,outlook的兼容html2,意思不需要写那么骚气的html标签。

html5:

  <div style="padding:1rem;">
    <h4>尊敬的客户,您好!</h4>
    <h5>您的电子发票已生成,发票信息如下:</h5>
    <div style="margin: 50px auto;">
      <ul style="background: #fdefe5; color: #eb5404; display: block; clear: both; width: 90%; overflow: hidden; border: 1px solid #eb5404;  padding:0; margin:0; list-style:none;">
        <li style="float: left; width: 30%;  line-height: 35px; box-sizing: border-box; text-align: center; padding:0; margin:0; list-style:none;">电子发票代码
        </li>
        <li style="float: left; width: 30%; border-left: 1px solid #eb5404; border-right: 1px solid #eb5404;line-height: 35px; box-sizing: border-box; text-align: center; padding:0; margin:0; list-style:none;">电子发票号码
        </li>
        <li style="float: left; width: 30%; line-height: 35px; box-sizing: border-box; text-align: center;  padding:0; margin:0; list-style:none;">开票日期
       </li>
      </ul>
      <ul style="margin-top: -2px;display: block; clear: both; width: 90%; overflow: hidden; border: 1px solid #eb5404; border-top: 0 !important; padding:0; margin:0;  list-style:none;">
        <li style="float: left; width: 30%;font-size: 80%; line-height: 35px; box-sizing: border-box; text-align: center; padding:0; margin:0; list-style:none;">{{1}}</li>
        <li style="float: left;width: 30%;font-size: 80%;  border-left: 1px solid #eb5404; border-right: 1px solid #eb5404; line-height: 35px; box-sizing: border-box; text-align: center; padding:0;  margin:0; list-style:none;">{{2}}</li>
        <li style="float: left; width: 30%; font-size: 80%; line-height: 35px; box-sizing: border-box; text-align: center; padding:0; margin:0; list-style:none;">{{3}}</li>
      </ul>
    </div>
    <h6>您可点击<a href="{{4}}" style="color:#eb5404; text-decoration: none;">进行发票查看、下载</a></h6>
    <div style="margin-top: 50px;">
      <p>本邮件最终解释权归股份有限公司所有</p>
      <p>如有任何疑问,您可以拨打联系我们</p>
    </div>
  </div>

html2:

<body>
        <table border="0" cellspacing="0" cellpadding="0">
            <tr><th>尊敬的客户,您好!</th></tr>
        </table>
        <table border="0" cellspacing="0" cellpadding="0" style="line-height: 30px;">
            <tr><td>您的电子发票已生成,发票信息如下:</td></tr>
        </table>
        <table width="100%" border="0" cellspacing="0" cellpadding="0" style="border: 1px solid #eb5404;margin: 20px auto;">
            <tr style="line-height: 30px;text-align: center; background: #fdefe5; color: #eb5404;">
                <th style="border-right:  1px solid #eb5404;">电子发票代码</th>
                <th style="border-right:  1px solid #eb5404;">电子发票号码</th>
                <th>开票日期</th>
            </tr>
            <tr style="line-height: 30px;text-align: center;">
                <td style="border-top:  1px solid #eb5404;border-right:  1px solid #eb5404;">1234567890</td>
                <td style="border-top:  1px solid #eb5404;border-right:  1px solid #eb5404;">1234567890</td>
                <td style="border-top:  1px solid #eb5404;">2018-11-12</td>
            </tr>
        </table>
        <table border="0" cellspacing="0" cellpadding="0" style="line-height: 30px;">
            <tr><td>您可点击 <a style="color: #eb5404;" href="#">进行发票查看,下载</a></td></tr>
        </table>
        <table width="100%" border="0" cellspacing="0" cellpadding="0">
            <tr style="line-height: 30px; text-align: center;"><td>本邮件最终解释权归股份有限公司所有</td></tr>
        </table>
        <table width="100%" border="0" cellspacing="0" cellpadding="0">
            <tr style="line-height: 30px; text-align: center;"><td>如有任何疑问,您可以服务热线</td></tr>
        </table>
        <table width="100%" border="0" cellspacing="0" cellpadding="0">
            <tr style="line-height: 30px; text-align: center;"><td><a style="color: #eb5404;" href="#">联系我们</a></td></tr>
        </table>
    </body>

 

  • 2
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值