通过sendgrid在电子邮件中添加“web版本链接”

时间:2013-12-04 14:44:53

标签: email web sendgrid

如何添加指向我的sendgrid电子邮件的网络版本的链接,例如“无法阅读此电子邮件,请点击此处”?

[编辑] 我使用php sendgrid库 包括“sendgrid-php-master / SendGrid_loader.php”;

我使用此代码并不起作用:

$mail = new SendGrid\Mail();
....
$mail->setHtml('<a href="[weblink]">View this email in your browser</a><br />'.$sg_html_code);
...

2 个答案:

答案 0 :(得分:0)

请注意,SendGrid在 2017 (2017年9月30日)终止了[weblink]和[unsubsribe]。您需要使用新的迁移工具包进行迁移。

从SendGrid here

了解详情

答案 1 :(得分:0)

仅需确认Lirianna所说的内容,即可获得Sendgrid支持团队对同一问题的回答:

  

仅在使用我们的Marketing Campaigns工具时支持使用[Weblink]。要在事务模板中使用此功能,您需要创建并托管自己的链接。