如何禁用Mailchimp双重选择PHP [英] How to disable Mailchimp double opt-in PHP

查看:334
本文介绍了如何禁用Mailchimp双重选择PHP的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Mailshimp东西完全新的,我不能在网路上找到任何禁止双重选择项。
我不使用任何Mailchimp API,我只是形式mailchimp给我把我的HTML。

不使用API​​,或者如果我有,使用API​​的任何想法?

感谢您!


解决方案

 要求('Mailchimp.php');
   $ API =新Mailchimp($ API_KEY);   $结果= $ API - > lists->认购($ API_KEY,$ ID,$数据[电子邮件],$ merge_vars,HTML,假);

第六参数定义是否禁用选择加入与否。把它作为假将其禁用。

有关详细信息请参考: - http://apidocs.mailchimp.com/ API / 2.0 /列表/ subscribe.php

I'm totally new in Mailshimp stuff and I can't find anything on the web to disable the double opt-in. I don't use any Mailchimp API, I just have the form mailchimp gave me to put in my html.

Any idea without using the API or if I have to, by using the API ?

Thank you !

解决方案

   require('Mailchimp.php');
   $api = new Mailchimp( $api_key );

   $result = $api->lists->subscribe( $api_key, $id,  $data['email'], $merge_vars, 'html', false );

6th parameter defines that whether to disable the opt-in or not. Pass it as false will disable it.

For more info refer:-http://apidocs.mailchimp.com/api/2.0/lists/subscribe.php

这篇关于如何禁用Mailchimp双重选择PHP的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆