Answer the question
In order to leave comments, you need to log in
How to send emails via Mailchimp API on Laravel 4?
everything is clear with Mailgun:
Mail::send('emails.example', $data, function($message) use ($user)
{
$message->from('[email protected]', 'CompanyName');
$message->to($user->email)->subject('10 популярных записей на этой неделе');
});
Answer the question
In order to leave comments, you need to log in
You have your own user base on the site. Your Mailchimp account has various mailing lists: news, promotions, etc. You need to synchronize these databases via the API: the user has signed up - follow
MailchimpWrapper::lists()->subscribe($list_id, array('email'=>$email_address));
, unsubscribed - unsubscribe. Thus, you keep the database up-to-date on your service account. Also, through the API (or manually through the Mailchimp website), you send to the mailing list.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question