Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when using aliases in view #20

Open
thomassb opened this issue Jun 23, 2016 · 2 comments
Open

Error when using aliases in view #20

thomassb opened this issue Jun 23, 2016 · 2 comments
Labels

Comments

@thomassb
Copy link

thomassb commented Jun 23, 2016

return Yii::$app->mailqueue->compose("@frontend/views/emails/newJob", [
                        'name' => $job->FullName,
                        'email' => $job->Email,
                        'address' => $job->FullAddressHtml,
                        'price' => $job->price,
                        'url' => Yii::$app->urlManager->createAbsoluteUrl(['job/review', 'url' => $job->url]) 
                    ])
                    ->setFrom(\Yii::$app->params['fromEmail'])
                    ->setTo($job->Email)
                    ->setSubject('New Order')
                    ->queue();

gives errror
The view file does not exist: /var/www/xx/frontend/mail/layouts/html.php

This works correctly when using the swiftmailer directly.
At the moment I am added this to the compose function
$this->htmlLayout = "@common/mail/". $this->htmlLayout;

@nterms nterms added the bug label Jun 27, 2016
@atakajlo
Copy link

atakajlo commented Dec 5, 2017

any progress?

@atakajlo
Copy link

atakajlo commented Dec 5, 2017

to avoid this error you simply must configure viewPath parametr in mailqueue config

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants