当我在tmp中检查调试和错误日志时没有任何内容 我尝试搜索相同的问题并按照它们但不起作用
function sendNewUserMail($id) {
$User = $this->Member->read(null,$id);
$this->Email->smtpOptions = array(
'port'=>'465',
'timeout'=>'30',
'host' => 'ssl://smtp.gmail.com',
'username'=>'*******@gmail.com',
'password'=>'*******',
);
$this->Email->delivery = 'smtp';
$this->set('smtp_errors',$this->Email->smtpError);
$this->Email->to = $User['Myprofile']['email'];
$this->Email->subject = 'WelCome To Alltweak.com Just Fun to create and share new registry script';
$this->Email->replyTo = 'tag601@hotmail.com';
$this->Email->from = 'T@QM@N<tag601@hotmail.com>';
$this->Email->template = 'simple_message'; // note no '.ctp'
$this->Email->sendAs = 'html'; // because we like to send pretty mail
$this->set('Member', $User);
$this->Email->_debug = true;
if ( $this->Email->send('Test Email') ) {
$this->Session->setFlash('Simple email sent');
} else {
$this->Session->setFlash('Simple email not sent');
}
}