nztim/mailchimp

Mailchimp API key is required - use the 'MC_KEY' .env value

Closed this issue · 4 comments

I am using Laravel 5.4 and am having this error message.

Mailchimp API key is required - use the 'MC_KEY' .env value

in Mailchimp.php (line 15)
at Mailchimp->__construct(null)in MailchimpServiceProvider.php (line 13)
at MailchimpServiceProvider->NZTim\Mailchimp{closure}(object(Application), array())in Container.php (line 726)
at Container->build(object(Closure))in Container.php (line 608)

I correctly set MC_KEY in the .env file
If I manually put the key in the boot method of the MailchimpServiceProvider class works correctly

nztim commented

Hi, it looks like the Mailchimp API key can't be found.
Please try dd(env('MC_KEY')) or Log::info(env('MC_KEY')) just before the Mailchimp reference and see what comes out.

nztim commented

Are you using config:cache? If so then update to the latest version (v3.3) and try again.

I upgraded to 3.3 and now it's working. Thank you.

nztim commented

Cool!