Here's what I did to get it working:
Modified your email script to include some output:
class MyShell extends Shell {
public function sendEmail() {
App::uses('CakeEmail', 'Network/Email');
$email = new CakeEmail();
$email->from('user@domain.com');
$email->to('user@domain.com');
$email->subject('Test Email from Cron');
$result = $email->send('Hello from Cron');
$this->out('Email sent successfully.');
}
}
Next, I tested via console to ensure it would work. For the above code, the "Shell" suffix in "MyShell" is omitted per the docs and the second parameter is the function name. Here was the CLI command that worked for me from the root of the application, /home/#####/domains/mydomain.com/html/cake/cakephp/app.
Console/cake my sendEmail
Output:
Welcome to CakePHP v2.4.1 Console
---------------------------------------------------------------
App : app
Path: /nfs/c##/h##/mnt/#####/domains/mydomain.com/html/cake/cakephp/app/
---------------------------------------------------------------
Email sent.
My value in the command box in the MT (gs) dashboard was constructed according to this. It includes:
cd 'app_root' && Console/cake 'class_name_sans_shell' 'function_name'
For the above code, that results in:
cd /home/#####/domains/mydomain.com/html/cake/cakephp/app && Console/cake my sendEmail
It's worth noting that "Console/cake" is our executable in this case so that's the program we are running.