しばらくの間 CakePHP を使用しており、Email コンポーネントを使用したいと考えていました。しかし、私はそれで問題を抱えています。
実際、メールを送信しようとすると、次のメッセージが表示されます。
メールを送信できませんでした。エラー: 内部エラーが発生しました。
うーん...しかし、なぜですか?^^
これが私のコントローラーです:
$this->Email->from = 'Email<my.email@myHost.fr>';
$this->Email->to = 'Another.Email@AnotherHost.com';
$this->Email->subject = 'This is the email Subject';
if ($this->Email->send('This is the email message'))
$this->set('success', 'Email successfully sent !');
そして、app/Config の私の Email.php:
public $smtp = array(
'transport' => 'Smtp',
'from' => array('contact@myHost.fr' => 'myHost'),
'host' => '192.168.10.50',
'port' => 25,
'timeout' => 30,
'username' => 'user',
'password' => 'secret',
'client' => null,
'log' => false,
//'charset' => 'utf-8',
//'headerCharset' => 'utf-8',
また、Cake が「sendmail」や「mail」などの電子メールの送信にバイナリを使用しているかどうかも知りたいと思っていました。私の Linux サーバーでは、これらのバイナリがインストールされていないからです。
何か案が ?