I’m working with Yii::mailer and struggling a bit on this.
So, with compose, you can specify the template to use easily via a call like:
return Yii::$app ->mailer ->compose( ['html' => 'emailVerify-html', 'text' => 'emailVerify-text'], ['user' => $user] )
This works great EXCEPT I can’t figure out how to have a common folder of email templates. There are times I want the frontend to send an email (e.g., user signup), and there are times I want a console app to send an email (e.g., reminders).
Currently, that means I have:
I’d rather all of my email templates (and layout) go into:
But when I try this, mailer->compose() can’t find the templates. I’ve poked around the docs but I can’t figure out how to say “all email templates/layout are always in location X”.