I\'m trying to send an email from a CakePHP shell just as you would from the Controller.
Most of the code below was adapted from this dated article on the Bakery an
If you're using CakePHP 2.x, you can ditch the EmailComponent entirely and use the CakeEmail class instead.
App::uses('CakeEmail', 'Network/Email');
class NotificationShell extends Shell {
public function send() {
$email = new CakeEmail();
}
}
That entirely avoids all the thorny issues of loading components inside a shell. For email at least.