Reputation: 13555
I am using mandrill to send email, and I follow the guidelines here:
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';
...and send the email
However, there is a tag option available in API, I would like to add tag to track the email :
https://mandrillapp.com/api/docs/messages.php.html
'tags' => array('password-resets')
The problem is, can I add tags without include their API file, e.g. add the tags at the header in phpmailer?
Thanks a lot for helping
Upvotes: 1
Views: 675
Reputation: 503
I used this variant with PHPMailer class:
$mail->AddCustomHeader('X-MC-Tags:password,some_other_tag');
Upvotes: 2