注文が保存されるとすぐにメールを送信する方法がわかりません。購入者が注文フォームにメールを入力すると、CakePHP 2.0 を使用して確認メールが送信されます。私は非常に多くの異なる方法を試しましたが、私は初心者であり、指示が必要です. 私に指示してください!
<?
class OrdersController extends AppController
{
var $name = 'Orders';
var $scaffold;
function add()
{
if ($this->request->is('post'))
{
if ($this->Order->save($this->request->data))
{
$this->Session->setFlash('Order has been saved');
$this->redirect(array('action' => 'index'));
}
else
{
$this->Session->setFlash('Unable to add order');
}
}
}
}
?>