In my laravel 5.7 app I make subscribe/unsubscribe to lists of mailchimp using https://github.com/spatie/laravel-newsletter It works when ok and all users are suscribed to the current mailchimp list, which is described in .env file
MAILCHIMP_APIKEY = NNNNNNNNNN
MAILCHIMP_LIST_ID = NNNNNNNNNN # ID of 'subscribers' mailchimp list
But as my site has several group news I try subscribe to mailchimp list with code :
$retData= Newsletter::subscribe($userProfile->email, ['FNAME'=>$userProfile->first_name, 'LNAME'=>$userProfile->last_name], 'subscribers'); // 3rd parameter can be different
where 3rd parameter is mailchimp list name, as I see it on the server as : https://prnt.sc/mqbgnb But I got error :
There is no list named `subscribers`.
Why error? Misconfiguring of of this mailchimp list ? It has some options, I am not sure if some of them is related to my issue ?
In doc I read as :
//Subscribe someone to a specific list by using the third argument:
Newsletter::subscribe('nanny.ogg@discworld.com', ['firstName'=>'Nanny', 'lastName'=>'Ogg'], 'Name of your list');
How to fix my error ?
Thanks!
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire