问题
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 !
回答1:
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
回答2:
Thx Garima but this is for API 1.3. There is API 2.0 now.
So you can use this snippet https://github.com/drewm/mailchimp-api
This is the simplest way to use the mailchimp API I think. Then like you said, you turn to false the double opt_in parameter.
http://apidocs.mailchimp.com/api/2.0/lists/subscribe.php
Have A Good Day
来源:https://stackoverflow.com/questions/26013592/how-to-disable-mailchimp-double-opt-in-php