macagua / example-yii-mail

Automatically exported from code.google.com/p/yii-mail
BSD 3-Clause "New" or "Revised" License
0 stars 2 forks source link

Theme support #13

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Create and activate theme "my_theme" (folder & config)
2. Create email template in /themes/my_theme/views/emails/my_email_template.php
3. In main config set 'viewPath' => 'application.views.emails',
4. Set $message->view = 'my_email_template';
5. Send mail

What is the expected output? What do you see instead?
The expected output would be an email that utilizes the template from the 
theme. Instead I get the Exception 
"require(/protected/views/emails/my_email_template.php): failed to open stream: 
No such file or directory" It clearly states that the template is not found 
because it is not searched for in the theme directory.

What version of the product are you using? On what operating system?
Yii 1.1.8, yii-mail_r9

Please provide any additional information below.
If necessary I will provide further information.

Original issue reported on code.google.com by i...@morphew.de on 23 Nov 2011 at 2:16

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Although it's not a fix you can workaround this issue by setting

$config['components']['mail']['viewPath'] = 
'webroot.themes.THEME_NAME.views.mail';

manually.

Original comment by pkmopera...@gmail.com on 19 Jan 2012 at 3:14