This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.
Hi,
I've followed the example within the following page, placing my view file at plugins/author/plugin/views/mail/message.htm but every time I try to send an email, it throws an exception 'View [author.plugin:mail.message] not found.'.
https://octobercms.com/docs/services/mail#mail-layouts
I'm using the following code to send the email:-
Mail::send('author.plugin:mail.message', Input::all(), function($message) {
Could anyone please suggest what I might be doing wrong or confirm whether the documentation is correct ?
Many thanks in advance.
Any chance you could share your ridiculously complicated solution? I have the exact same issue.
Ok, for anyone else landing here-
You need to register the view by adding the following to your Plugin.php file
public function registerMailTemplates() { return [ 'author.plugin::mail.message' => 'My template description.', ]; }
Note the double set of colons ::
Then you can use it like this
`Mail::send('author.plugin::mail.message' , $vars, function($message) {
});`
Last updated
1-4 of 4