Closed sergeynilov closed 5 years ago
Sorry, I still search for decision...
You can add more lists in your config/newsletter.php
file.
There is an array called lists
to which you can your different newsletters, for example:
/*
* Here you can define properties of the lists.
*/
'lists' => [
'list_name1' => [
'id' => env('MAILCHIMP_LIST_ID1'),
],
'list_name2' => [
'id' => env('MAILCHIMP_LIST_ID2'),
],
],
@delenamalan @freekmurze Is there a way to directly provide list id value when subscribing a user instead of adding it in the config file?
Hello, 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
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 :
How to fix my error ?
Thanks!