简体   繁体   中英

Reset password in laravel with mailchimp

I am trying to generate a password reset with mailchimp through Laravel.

The first thing I tried was to use the one that comes by default in Laravel but modifying the sendResetLinkEmail function. I thought 'Ok, just change this to the mailchimp api and everything else will still work the same'. But clearly that was not what happened.

After hours and hours of thinking about it, I understood that I do not have to modify the files that are in vendor for any reason, which means that I am facing this problem wrong from the beginning.

Now I'm already finishing my work schedule and I haven't made a single significant progress in this matter of resetting the password. But what I did understand is that I must face the problem in another way. The question is how? How can I achieve mailchimp integration with laravel? Has anyone done something like this and can give me some guidance? Because honestly I don't know how I should even start. I really appreciate any advice you give me.

It is worth clarifying that it is not an option not to use mailchimp, it is what the company wants.

So the one issue is the password reset emails are transactional, and mailchimp is for marketing emails. So you'll need to follow their guide to setup transaction email .

So ensure you have that setup, and then the simplest way is probably to just the Laravel smtp driver, so in Laravel you'll have in your .env something like

MAIL_DRIVER=smtp
MAIL_HOST=smtp.mandrillapp.com
MAIL_PORT=465
MAIL_USERNAME=<primary contact email on your Mailchimp account>
MAIL_PASSWORD=<Any valid Mailchimp Transactional API key>
MAIL_ENCRYPTION=ssl
MAIL_FROM_NAME=no-reply

and then it should "just work"

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM