Email cakephp电子邮件组件没有';行不通

Email cakephp电子邮件组件没有';行不通,email,cakephp,smtp,cakephp-1.3,Email,Cakephp,Smtp,Cakephp 1.3,当我在tmp中签入调试和错误日志时,什么都没有 我试着搜索同一个问题并遵循它们,但不起作用 function sendNewUserMail($id) { $User = $this->Member->read(null,$id); $this->Email->smtpOptions = array( 'port'=>'465', 'timeout'=>'30', 'host' => 'ssl://smtp

当我在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'); 
    } 
函数sendNewUserMail($id){
$User=$this->Member->read(null,$id);
$this->Email->smtpOptions=array(
“端口”=>“465”,
“超时”=>“30”,
'主机'=>'ssl://smtp.gmail.com',
“用户名”=>“******@gmail.com”,
“密码”=>“*******”,
);
$this->Email->delivery='smtp';
$this->set('smtp_errors',$this->Email->smtpError);
$this->Email->to=$User['Myprofile']['Email'];
$this->Email->subject='欢迎来到Alltweak.com创建和共享新的注册表脚本很有趣';
$this->Email->replyTo='stag601@hotmail.com';
$this->Email->fromT@QM@N′;
$this->Email->template='simple_message';//注意编号'.ctp'
$this->Email->sendAs='html';//因为我们喜欢发送漂亮的邮件
$this->set('Member',$User);
$this->Email->_debug=true;
如果($this->Email->send('testemail')){
$this->Session->setFlash(“发送简单电子邮件”);
}否则{
$this->Session->setFlash(“未发送简单电子邮件”);
} 
}

看看。。我认为这个函数与你的函数相似

祝你好运