public function emailcheck()
{
$this->Email->smtpOptions = array(
'port'=>'465',
'timeout'=>'30',
'host' => 'ssl://smtp.gmail.com',
'username'=>'prathapskp@gmail.com',
'password'=>'12.06.1989',
);
$this->Email->delivery = 'smtp';
$this->Email->from = 'prathap <prathapskp@yahoo.com>';
$this->Email->to = 'prathapskp@gmail.com';
$this->Email->subject ='hello' ;
// $this->Email->template = 'register';
// $this->set('user', $this->data);
//$this->Email->delivery = 'debug';
if($this->Email->send('Hello message body!'))
{
$this->redirect('/');
}else
{
$this->Session->setFlash(__('error occured', true));
}
}
}
0 comments:
Post a Comment