This post will help you to generate lead in any MailChimp Campaign using it’s Php library. Follow the steps of this tutorial and you will be able to add email to listed campaign into any mailchimp account.
MailChimp is an email marketing service and the trading name of its operator, an American company, founded in 2001 By June 2014 it was sending over 10 billion emails per month on behalf of its users.
Note : This post assumes that you have Campaign list ID and MaliChimp key.
Download the MailChimp Library from Below.Download Now
Create mail.php file and add the code below.
include 'MCAPI.class.php'; //Include library file here
$api_key = "YOUR MailChimp API KEY HERE";
$list_id = "ENTER LIST ID HERE"; //In which you want to add email
$email = "Email ID HERE";
$api = new MCAPI($key);
echo $api->errorMessage; //If any error occurs.
if($api->listSubscribe($list_id, $email, '') === true)
echo "Email Added successfully.";
echo "Something went wrong. Try Later.";
You are just follow these simple steps and you will be able to get emails into your Listed Campaigns.