我想使它所以當有人點擊電子郵件中通過山魈API發送(使用PHP)的退訂鏈接,它的工作原理中所述:http://help.mandrill.com/entries/23815367-Can-I-add-an-automatic-unsubscribe-link-to-Mandrill-emails-山魈的UNSUB合併標籤沒有得到解析
的*|UNSUB|*
合併標籤沒有得到解析。它只是在收到的電子郵件正文中出現。
近郵件內容($ MESSAGE_CONTENT)結束時,我有:
<a href="*|UNSUB:http:/mydomain.com/unsubscribe-from-mailing-lists/|*">Click here to unsubscribe.</a>
在Gmail中,鏈接:點擊這裏退訂。 (不是有效的HREF,因此Gmail只會忽略錨標記)
在Outlook 2010中,鏈接是:單擊此處取消訂閱。 (不是有效的HREF)
是否有一些merge_vars參數我應該添加到標頭? http://help.mandrill.com/entries/21678522-How-do-I-use-merge-tags-to-add-dynamic-content-提到它們,但我無法找到UNSUB合併標記的參數。
$mandrill = new Mandrill($mandrill_api_key);
$message = array(
'html' => $message_content,
'subject' => $subject,
'from_email' => '[email protected]',
'from_name' => 'MY NAME',
'to' => $to_list,
'headers' => array('Reply-To' => '[email protected]'),
'important' => false,
'track_opens' => 1,
'track_clicks' => null,
'auto_text' => null,
'auto_html' => null,
'inline_css' => null,
'url_strip_qs' => null,
'preserve_recipients' => 0,
'view_content_link' => 1,
'tracking_domain' => null,
'signing_domain' => null,
'return_path_domain' => null,
'merge' => true,
'global_merge_vars' => array(
array(
'unsub' => 'unsub'
)
),
);
我錯過了什麼步驟? TIA! TIA!
嗨!你可以請分享一些更多的細節,比如這個.init文件位於何處?在WP 3.9的最新更新中表現不錯。我面臨同樣的問題,但無法找到更改此屬性的位置。 –