2014-02-28 56 views
0

我想使它所以当有人点击电子邮件中通过山魈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!

回答

1

问题是网址缺少斜线(http:/ mydomain ...) 这是由TinyMCE转换网址引起的。我添加了convert_urls: false到tinymce.init并解决了我的问题。

Mandrill的荣誉支持帮助我识别问题。

+1

嗨!你可以请分享一些更多的细节,比如这个.init文件位于何处?在WP 3.9的最新更新中表现不错。我面临同样的问题,但无法找到更改此属性的位置。 –