如何在 Mandrill 中向外发电子邮件添加标签(来自 Mailchimp 的电子邮件服务)?
How to add tags to outgoing email in Mandrill ( An email services from Mailchimp)?
我正在使用 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?
中的 header 添加标签
非常感谢您的帮助
我在 PHPMailer 中使用了这个变体 class:
$mail->AddCustomHeader('X-MC-Tags:password,some_other_tag');
我正在使用 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?
中的 header 添加标签非常感谢您的帮助
我在 PHPMailer 中使用了这个变体 class:
$mail->AddCustomHeader('X-MC-Tags:password,some_other_tag');