I'm sending emails with laravel..
When I run:
\Mail::queue(['emails.subscription-past-due'],
[],
function($message) {
$message->from('accounts@mysite.com', 'FromName')->to($this->email, $this->name)->subject('Oops.. We detected a problem');
});
I get the following error..
InvalidArgumentException View [emails.subscription-past-due] not found.
So I checked and the view is there in the folder, so I tried with send:
\Mail::send(['emails.subscription-past-due'],
[],
function($message) {
$message->from('accounts@mysite.com', 'FromName')->to($this->email, $this->name)->subject('Oops.. We detected a problem');
});
Works perfectly fine.. very weird..
And then I tried changing to another view with queue
\Mail::queue(['emails.subscription-canceled'],
[],
function($message) {
$message->from('accounts@mysite.com', 'FromName')->to($this->email, $this->name)->subject('Oops.. We detected a problem');
});
Also works fine.. too weird..
What could be going on? Tried restarting the server, erasing cache, nothing helps. Yes, I am sure the file is there.
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire