私は、私たちのウェブサイトにメッセージを投稿したユーザーに電子メールを送信するシェルを書いています。メール送信は Mandrill 経由で行われ、プラグイン経由で送信されます。
パスは次のとおりです。
/app/Plugin/mandrill/Controller/Component/MandrillComponent.php
この回答済みの SO 投稿 (http://stackoverflow.com/questions/10880694/using-a-plugin-component-from-shell-class-in-cakephp-2-0-2) に続いて、次のものがあります。
App::uses('Controller', 'Controller');
App::uses('ComponentCollection', 'Controller');
App::uses('MandrillComponent', 'mandrill.Controller/Component');`
$Collection = new ComponentCollection();
$Mandrill = new MandrillComponent($Collection);
Console/cake NotifyMailer 経由でシェルを実行しましたが、次のエラーが表示されました: Plugin mandrill could not be found.
私はしばらくこれに苦労してきたので、どんな助けでも大歓迎です。
ありがとう!