FAQ Database Discussion Community


'require' statement in index.js causes error saying mailchimp module cannot be found

node.js,module,mailchimp
I'm using this API for a web app I'm making that uses mailchimp: Here's the node.js API page I'm also using this git repo to understand how to use the API: example repo I cloned the repo, ran npm install express in the express directory of the repo, then ran...

Error “emails”:“Please enter an array” when making a request to MailChimp API V2.0

python,mailchimp,mandrill
I have been trying to make a request to the V2 MailChimp API. When I uses the following method : def get_subscriber_info(self, list_id, email): url = "https://us3.api.mailchimp.com/2.0/lists/member-info.json" headers = {'content-type': 'application/json; charset=UTF-8'} payload = {"apikey": "XXXXXXXXXXXXX9999XXX98X886544", "id": "4hstitfbaa", "emails":[{'email':"[email protected]"}] } r = requests.get(url, params=payload, , headers=headers) return r.json() I get...

Calling MailChimp API v3.0 with .Net

c#,http,mailchimp
I'm trying to access our MailChimp account via the new 3.0 REST API. I've done the following: using(var http = new HttpClient()) { var creds = Convert.ToBase64String(Encoding.ASCII.GetBytes("username:mailchimpapikey-us1")); http.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Basic", creds); string content = await http.GetStringAsync(@"https://us1.api.mailchimp.com/3.0/lists"); Console.WriteLine(content); } However, when I run this code, I get a 401 error...

Mailchimp API 2.0 - creating campaign with saved segment

php,yii2,mailchimp
I'm trying to create a campaign through Mailchimp API 2.0 for a saved segment. My code is: $segment_opts = [ 'list_id' => $list_id, ['saved_segment_id' => Yii::$app->request->post('segments')], ]; $campaign = Yii::$app->mailchimp->campaigns->create($type, $options, $content, $segment_opts); And the error is: Mailchimp_Invalid_Options "match" must be "any" or "all" I don't get it why, since...

mailchimp segments & groups

mailchimp,mailing-list
In Mailchimp is I click on a user I can see which group they belong to under the details tab but I can't see which segment they belong to. Is there a way to check which segment they are in? Also is their a difference between customer groups & groups?...

Send a campaign more than once in MailChimp

php,mailchimp
I am trying to send an email to users based on their status. The first email needs to be sent after 2 hours, and a second one after 24 hours. I am running a PHP script that checks for users who belong to a state and I sent the first...

Writing an email list (txt file) with codeigniter to import in mailchimp

php,codeigniter,mailchimp
I want to generate an email list from all the users in my database. I followed this guide http://www.codeigniter.com/userguide2/helpers/file_helper.html Also I tried this: PHP Write string to new line for the first time and not at the end of file I already got users from my database, this is what...

Updating subscribers in a list using cURL and Mailchimp API v3

php,api,curl,mailchimp
I have this code below that adds a user to a pre-existing list in Mailchimp. $apikey = '<api_key>'; $auth = base64_encode( 'user:'.$apikey ); $data = array( 'apikey' => $apikey, 'email_address' => $email, 'status' => 'subscribed', 'merge_fields' => array( 'FNAME' => $name ) ); $json_data = json_encode($data); $ch = curl_init(); curl_setopt($ch,...

Mail Chimp API and Different Arrays

php,mailchimp
Ok. I'm using a script from Aaron Walter to connect to MailChimps API. There are three spots on the website and I'd like to "track" where the signup came from. I'm able to get this to work with the following code but can't wrap my mind around how to adjust...

Mail Chimp Custom Form

css,mailchimp
I am new to this, I am trying to create a custom mail chimp sign up form. I want it to look like this http://imgur.com/YbwSzA2 I have started coding the form #mce-FNAME { margin: 10px; float: left; width: 50%; } #mce-LNAME { margin: 10px; float: left; width: 50%; } #mce-email...

Does @font-face work in email templates?

css,email,font-face,html-email,mailchimp
Is there a way that I can embed custom web fonts using CSS's @font-face in email templates. This question is specifically related to email templates in MailChimp, but I would also like to know if there is a cross-browser solution that works on all or most email subscription services? I...

Can i keep a user in my Mailchimp list after he unsubscribed?

php,mailchimp
I am using Mailchimp API in PHP to subscribe users to a Mailchimp list with daily cron job, I want to keep the users in this list after they unsubscribed (without them getting newsletters) because if they will be deleted from the list i will invite them over and over...

Adding subscribers to a list using Mailchimp's API v3

php,api,mailchimp
I'm trying to add users to a list I've created in Mailchimp but I can't find any code examples anywhere. I've tried figuring out how to use the API but I'm very much a "Look at an example and learn" kind of person. I've tried using version 2 of the...

Mailchimp form embed with Bootstrap [closed]

twitter-bootstrap,twitter-bootstrap-3,responsive-design,mailchimp
I'm wanting to create a responsive Mailchimp embed form with Bootstrap. I embedded the form but it's not responsive. It's only an issue for mobile devices. I want to be able to make the submit bottom go below the email input for mobile devices and both of these fields to...

MailChimp API: Batch Check Subscription Status

php,api,mailchimp
What's the best way to check a batch of email addresses and whether or not they are subscribed to a particular list? My current method is making an API call for each email address, but this becomes very slow when the count becomes > 50. I'm using V2.0, using PHP...

What's going on with this class constructor function in the PHP MailChimp API wrapper?

php,mailchimp
I'm going to start using the MailChimp API wrapper for PHP and I've come across something I don't understand. The code is set up with a root file called Mailchimp.php which requires other .php files with classes for specific API calls (e.g. Templates, Campaigns, Lists, etc). The parent class is...

Prevent readding unsubscribed users

ruby-on-rails,mailchimp,gibbon
According to this post, Mailchimp prevents resubscription automatically. But this is not true, and if you run a gb.lists.subscribe(...) on a Gibbon instance, it will resubscribe the user even if it was unsubscribed. So my question: is this a Gibbon bug? A Mailchimp bug? Is this blog post wrong? Or...

Mail Chimp - Add form to email template

php,forms,email,iframe,mailchimp
I am trying to add a form to my Mail Chimp Emailer using the code tool and then adding my form code, but when I preview the Emailers, the form and checkboxes are striped out: <form action="http://www.example.com/Emailer.php"> <input type="checkbox" id="ancaster" /><label for="ancaster">Ancaster</label> <input type="checkbox" id="beamsville" /><label for="beamsville">Beamsville</label> <input type="checkbox" id="binbrook"...

Subscribe Mailchimp from controller without form CakePHP

json,cakephp,mailchimp
I am creating a webservice for an Android application. The Android application have a "Newsletter subscription" option with 3 fields : - email - surname - phone_number The application send theses data in json format to the NewsletterControlleur.php on my web service: { "Newsletter":{ "user":{ "first_name":"Hugo", "surname":"Dumoulin", "phone":"0606060606", "email":"[email protected]" }...

Sending MailChimp email with Rails

ruby-on-rails,email,devise,mailchimp,mandrill
((I've found similar questions to mine, but they are specific to a 3rd party mandrill gem, or Heroku. I'm not using any of those, just the mandrill-api itself.)) I'm trying to use email confirmation (we use Devise) for account creation. I've set up confirmable, everything with that works well. Initially,...

How to find mailchimp campaign ID using API

python,mailchimp
I am trying to get mailchimp campaign ID using /campaigns/list endpoint. Then I need to use the id to invoke /reports/unsubscribes endpoint. Here is my code using mailchimp python sdk: m = get_mailchimp_api() campaigns = m.campaigns.list() for campaign in campaigns['data']: cid = campaign['id'] title = campaign['title'] unsubscribes = m.reports.unsubscribes({'cid':cid}) This...

Getting theMailchimp Member info with PHP/API with campaign EID

php,mailchimp
I am using the Mailchimp API for a few things successfully, one thing I want to do, but can not find the answer for, is using the mc_eid, request the members basic info ( first/last name, email ). I can do it if I have the email address, but if...

Custom RSS feeds for my Ghost blog

mailchimp,ghost-blog
I’m new to web development … just dipping my toes in Is there a way to get custom RSS feeds with Ghost? I have a list of my family members on mailchimp and I’d like to send them a weekly summary of what happened on my blog this week. Rather...

Mailchimp Custom Form CSS

html,css,wordpress,wordpress-plugin,mailchimp
I have created a MailChimp form for the footer of my website, I have modified the CSS with a bit of help to get it looking how it does now. I've become stuck now I attached two images the first one is how I want the form to look and...

Mailchimp Ecommerce360 Javascript Implementation

javascript,rest,e-commerce,mailchimp
Wondering if anyone can provide an example of how to pass a request to the /ecomm/order-add function of the Mailchimp API using javascript. This is critical for making use of Mailchimp's Ecommerce360 tracking. Here is documentation from Mailchimps API: https://apidocs.mailchimp.com/api/2.0/ecomm/order-add.php...

Mailchimp returns true but email not in list of subscribers

php,laravel-4,mailchimp
Laravel 4.2 Mailchimp Library: https://github.com/hugofirth/laravel-mailchimp I have already created a list and added two subscribers in Mailchimp GUI. <?php $list_id = '******'; $email_address = '[email protected]'; $subscriber = MailchimpWrapper::lists()->subscribe( $list_id, array('email'=>$email_address) ); return Response::json ( [ 'response' => $subscriber ] ); ?> Response is true { "response": { "email": "[email protected]", "euid":...

Using HTML in Mandrill handlebar merge variables

php,mailchimp,mandrill
If I have a handlebar merge variable like {{message}} in my template, how can I have it render HTML output if given the following in PHP: array( 'name' => 'message', 'content' => '<p>First paragraph.</p><p>Second paragraph.</p>' ) Right now it outputs the content without parsing the paragraph tags....