I am using a cakephp3 plugin to manage a mail queue to send newsletter (Lorenzo Cakephp Email Queue). It works fine, but I need to use a Shell method with the bake command to send the newsletter. It is not a problem with a cron job, but I would like to be able to send test mail without waiting for the cron job. I tried to call the bake command with a php exec command, but it does not work (maybe a right problem ?) but I don't have access to the server to manage the rights. But, as the method and the controller are both in cakephp, I think it's weird to do it with a console (external) bake call...
Is there a way to call a Shell method from a Controller, which would be the "cleanest" and easiest way ?
Thanks all for you help !