hugofirth / laravel-mailchimp

A composer package for the MailChimp API PHP class (as provided by MailChimp) which supports the Laravel 4 framework.
96 stars 27 forks source link

How do i make the call for the subscribe function? #24

Open closca opened 10 years ago

closca commented 10 years ago

I have made in this way MailchimpWrapper::lists()->subscribe('4c7d82aa69','mail@mail.com'); but i get error: Validation error: {"email":"Please enter a struct\/associative array"}

Thanks

HHashi commented 10 years ago

Have you tried the below?

MailchimpWrapper::lists()->subscribe('4c7d82aa69', array('email' => 'mail@mail.com'));

loirotv commented 6 years ago

Hi!

How do I set extra params (name, surname...)

I've tried this but it only saves the email:

MailchimpWrapper::lists()->subscribe($list_id, array('email' => $item->descripcion, 'Name' => $registro->name, 'Surname' => $registro->surname, 'id' => $registro->id));