-
Notifications
You must be signed in to change notification settings - Fork 11.1k
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
Mail::queue causes an error #1985
Comments
Grab the code directly from your controller and paste it into paste.laravel.com |
Hmm, I don't know that this will fix but just for kicks can you move the opening brace of your Closure onto its own line? |
No joy Im afraid - just for the fun of it I also tried removing all spaces, tabs etc, various combinations of line breaks but no go |
I'm having the same issue, i think: |
Try http://paste.laravel.com/IPs Remove the space between function and ($message) make it read function($message) |
This should be fixed. |
I have configured my app to use a beanstalkd queue, and it works just fine for custom job handlers, but if I use Mail::queue then it causes the following error:
Unhandled exception: syntax error, unexpected ';'
/var/www/api/vendor/laravel/framework/src/Illuminate/Support/SerializableClosure.php(173) : eval()'d code on line 3
#0 [internal function]: Illuminate\Exception\Handler->handleShutdown()
#1 {main} [] []
The calling code in the controller is:
Mail::queue('emails.order-new', array(), function ($message) {
$message->to('myemail@local', 'Fname Lname')->subject('Order Received');
});
If I log the $payload['code'] in SerializableClosure.php it outputs:
Mail::queue('emails.order-new', array(), function ($message) {
$message->to('myemail@local', 'Fname Lname')->subject('Order Received');
}
It looks like it is missing the final ')'
The text was updated successfully, but these errors were encountered: