SendGrid锚点<a> tag is not working properly in Outlook

时间:2017-09-13 17:16:48

标签: node.js email outlook sendgrid

I used Sendgrid api for email template and in one of email has some confirmation functionality and for that I used an anchor tag which is redirecting to backend server and then backend api did all stuff. It is working fine, but some of outlook clients are complaining that they are not redirecting to the correct address.

I got the link from the client (outlook) which is something below:

https://owa.nexus.ox.ac.uk/owa/redir.aspx?SURL=u16WQnU .......

但是上面的链接是错误的,在sendgrid中,链接应该如下所示:

https://u3550765.ct.sendgrid.net/wf/click?upn=hj8lklPLwDMw .......

任何人都可以帮助我并建议我在Outlook中是sendgrid问题还是与Outlook设置有关?

以下是电子邮件模板:

  <div style="width: 500px;margin: auto;margin-top: 37px;">
    <div class="rest-btn" style="display: inline-block;margin: 10px;width: 200px;color: #fff;height: 40px;border: none;border-radius: 5px;line-height: 2.9;text-align: center;border: 1px solid #ccc;padding: 0px;background-color: #4dbc39;">
      <a href="{{ baseURL }}” style="color: white !important;text-decoration:none">ACCEPT</a>
    </div>
    <div class="rest-btn" style="display: inline-block;margin: 10px;width: 200px;height: 40px;border: none;border-radius: 5px;color:#ffffff;line-height: 2.9;text-align: center;padding: 0px;border: 1px solid #ccc;padding: 0px;background-color: #4dbc39;">
      <a href="{{ baseURL }}" style="color:white;text-decoration:none">DECLINE</a>
    </div>
  </div>

1 个答案:

答案 0 :(得分:0)

我怀疑问题是您使用的是Outlook特定的HTML(VML)来生成按钮。 SendGrid不会包装这些链接,这就是为什么它不起作用。

如果您可以发布您发送的HTML样本,将会很有帮助。然后我们可以确认这是否是问题。