You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

HTML/CSS邮件签名格式优化求助:使用后邮件频发垃圾邮箱

邮件签名HTML代码优化方案

我用免费在线工具做了邮件签名,但加上它之后邮件总被扔进垃圾文件夹。查了资料才知道,HTML代码格式不对会触发垃圾邮件检测,删掉签名后邮件就能正常进收件箱了。

预期样式

邮件签名预期样式

修复后的代码(可直接使用)

<table cellpadding="0" cellspacing="0" style="border-collapse:collapse;font-family:Arial;line-height:1.15;color:#000;">
  <tr>
    <td style="font-size:0;height:24px;line-height:0;"></td>
  </tr>
  <tr>
    <!-- 左侧Logo -->
    <td style="width:91px;vertical-align:top;padding:0 18px 0 1px;">
      <a href="你的网站链接" target="_blank">
        <img src="你的Logo链接" height="91" width="91" style="width:91px;height:91px;vertical-align:middle;border:none;border-radius:0;" alt="品牌Logo">
      </a>
    </td>
    <!-- 右侧内容区域 -->
    <td valign="top" style="vertical-align:top;">
      <!-- 姓名和职位 -->
      <table cellpadding="0" cellspacing="0" style="border-collapse:collapse;width:100%;">
        <tr>
          <td style="line-height:1.32;padding-bottom:18px;font-family:Arial;">
            <span style="font-weight:bold;color:#62738C;line-height:1.92;font-size:20px;">First Last Name</span><br>
            <span style="font-weight:normal;color:#62738C;line-height:1.2;font-size:14px;">Astrobnb | Host Services</span>
          </td>
          <!-- 社交图标 -->
          <td style="vertical-align:bottom;text-align:right;padding-bottom:18px;">
            <a href="Facebook链接" target="_blank" style="margin-left:6px;">
              <img width="28" height="28" src="Facebook图标链接" style="border:none;" alt="Facebook">
            </a>
            <a href="Instagram链接" target="_blank" style="margin-left:6px;">
              <img width="28" height="28" src="Instagram图标链接" style="border:none;" alt="Instagram">
            </a>
            <a href="Yelp链接" target="_blank" style="margin-left:6px;">
              <img width="28" height="28" src="Yelp图标链接" style="border:none;" alt="Yelp">
            </a>
          </td>
        </tr>
        <!-- 分隔线和联系方式 -->
        <tr>
          <td colspan="2" style="padding:18px 0;border-top:solid 1px #45668E;border-bottom:solid 1px #45668E;">
            <span style="font-size:12px;color:#62738C;white-space:nowrap;">
              <img src="电话图标链接" style="vertical-align:-2px;width:13px;" width="13" alt="电话">
              <a href="tel:555-555-5555" style="color:#62738C;text-decoration:none;"> 555-555-5555</a> &nbsp;
              <img src="网站图标链接" style="vertical-align:-2px;width:13px;" width="13" alt="网站">
              <a href="你的网站链接" style="color:#62738C;text-decoration:none;"> astrobnb.co</a> &nbsp;
              <img src="邮件图标链接" style="vertical-align:-2px;width:13px;" width="13" alt="邮件">
              <a href="mailto:email@email.com" style="color:#62738C;text-decoration:none;"> email@email.com</a>
            </span>
          </td>
        </tr>
        <!-- 行动按钮 -->
        <tr>
          <td colspan="2" style="padding-top:18px;text-align:center;">
            <a href="预约链接" target="_blank" style="display:inline-block;background-color:#24A0ED;color:#FFFFFF;font-weight:500;text-decoration:none;text-align:center;line-height:30px;font-size:15px;border-radius:20px;padding:6px 100px;">
              Book a Cleaning Today!
            </a>
          </td>
        </tr>
      </table>
    </td>
  </tr>
</table>

优化说明

  1. 修复语法错误:补全原代码中未闭合的标签,移除无效的样式属性(比如font-weight:;)
  2. 简化嵌套结构:删除冗余的多层嵌套表格,减少代码复杂度,降低垃圾邮件检测风险
  3. 优化样式逻辑:统一内联样式,用padding替代冗余的border-width设置按钮尺寸,去除不必要的rel="nofollow noreferrer"(正常业务链接无需添加)
  4. 提升兼容性:保留邮件客户端兼容的基础样式,移除可能触发检测的可疑类名(比如sc-eqIVtm kRufpp)
  5. 增强可读性:添加注释区分不同模块,方便后续修改

内容的提问来源于stack exchange,提问作者calebalo

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.08.03 03:15:43