我正在使用mandrill发送电子邮件,我遵循这里的指导方针:
https://mandrill.zendesk.com/hc/en-us/articles/205582147-How-to-Send-with-PHPMailer$mail->Host = 'smtp.mandrillapp.com'; // Specify main and backup server
$mail->Port = 587; // Set the SMTP port
$mail->SMTPAuth = true; // Enable SMTP authentication
$mail->Username = 'MANDRILL_USERNAME'; // SMTP username
$mail->Password = 'MANDRILL_APIKEY'; // SMTP password
$mail->SMTPSecure = 'tls';
…发送邮件
然而,在API中有一个标签选项可用,我想添加标签来跟踪邮件: https://mandrillapp.com/api/docs/messages.php.html'tags' => array('password-resets')
问题是,我可以添加标签而不包括他们的API文件,例如在phpmailer的头添加标签吗?
谢谢你的帮助
我在PHPMailer类中使用了这个变体:
$mail->AddCustomHeader('X-MC-Tags:password,some_other_tag');