Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我知道通过 API 使用 SparkPost 发送电子邮件,我可以禁用打开和点击跟踪:
options.open_tracking set to false options.click_tracking set to false
但是,我使用 PHPmailer 发送。我无法将我的电子邮件链接转换为乱码。我需要实际链接,而不是 SparkPost 转换后的链接。据我了解,这将通过不使用 SparkPost 电子邮件跟踪打开和点击来实现。
提前致谢
您需要使用X-MSYS-API自定义标题。
X-MSYS-API
$x_msys_api = array( 'options' => array ( 'open_tracking' => false, 'click_tracking' => false ) ); $phpmailer->addCustomHeader('X-MSYS-API', json_encode($x_msys_api));
我假设你有$phpmailer对象(PHPMailer 类的实例),相应地替换它。
$phpmailer
这是官方文档。这是一个使用示例。