I'm on the latest release of craft 3.x. I have the HTML Email Template setting set to a twig file in my templates folder. When sending a test email the template is used to send the test email, however when I call Craft::$app->users->sendPasswordResetEmail($user); from my plugin code, the template file is not used and the default system email template is used.

Is there something I'm missing here?

1 Answer 1


I've had issues in the past where Twig template errors would cause the HTML email template to fallback to using the default plain text system email template. It's definitely worth checking your web.log file for any errors when the sendPasswordResetEmail method is invoked, if you haven't already.

  • This may have been it because I was testing to see if the ID and CODE vars were accessible in my template. I have since came up with a different way of doing this so I haven't verified this was the actual solution or not but it makes sense. Commented Jul 1, 2019 at 17:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.