-
Notifications
You must be signed in to change notification settings - Fork 11
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
The sendMail {} method is not found in a controller #4
Comments
Hi there, Hmm. The controller sendMail method was added for allowing easy porting If you raise an issue I will take a look at getting this working again. Cheers,
|
I would agree with you about sending email from controllers, but I was hoping that others did anyway. I am hoping to use a couple of plugins that send emails for things like signups, and password recovery and such. I was hoping that if the sendgrid sendMail method worked in the controllers, that the other plugins would use the controller method instead of the mailService service. Hmmm... I wonder... have you tried essentially aliasing the mailService service with your sendGridService by creating your service as a spring bean with the mailService name? I might have to try that... but I am a little green to grails still. What would be nice actually would be an api that grails supports that sendMail or your plug in implement, so that any plugin wanting to send email would use that api and everything would just work :-) |
Oddly enough Peter Ledbrook and I started working on this, and we got a basic structure working. Sadly, I don't have time to continue this work at the moment so I've had to leave it for now. |
I have successfully sent an email from a controller with the sendGridService.sendMail {} method, and using the builder. (That works great, so thanks!) However, just calling sendMail {} from a controller method give me an error.
There is a no such method error for MyController.sendMail() is applicable for argument types MyController$_display_closure1. It appears that the sendMail method isn't registered in the controller, or is not expecting a closure?
The text was updated successfully, but these errors were encountered: