2016-09-08 4 views
1

私は電子メールを送信するためにマンドリルを使用しています、と私はここのガイドラインに従ってください。Mandrillの送信メールにタグを追加する方法(Mailchimpのメールサービス)

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のヘッダーにタグを追加しますか?たくさん

答えて

1

を支援するための

おかげで私はphpmailerのクラスでこのバリアントを使用:

$mail->AddCustomHeader('X-MC-Tags:password,some_other_tag'); 
関連する問題