전자 메일을 보내기 위해 CakePHP의 전자 메일 구성 요소를 성공적으로 사용해 왔지만 제한 사항으로 인해 이제는 SMTP 릴레이 서버를 사용하도록 설정해야하며 이상한 결과가 나타납니다. 여기 CakePHP 전자 메일 구성 요소 smtp 실패
내 코드입니다 : 내가 시도하고 이메일을 보낼 때마다 지금$this->Email->to = $user['User']['username'].' <'.$user['User']['email'].'>';
$this->Email->subject = 'MyWebsite.com – Please confirm your email address';
$this->Email->from = 'MyWebsite.com <[email protected]>';
$this->Email->template = 'user_confirm';
$this->Email->sendAs = 'html';
$this->Email->smtpOptions = array(
'timeout' => '30',
'port' => '25',
'host' => 'mail.myrelayserver.com',
'username' => 'USERNAME',
'password' => 'PASSWORD'
);
$this->Email->delivery = 'smtp';
if ($this->Email->send()) {
return true;
} else {
echo $this->Email->smtpError;
}
, 송신 실패하고 나는 $에서 다음 OUPUT를 얻을 수 this-> 이메일 -> smtpError :
14.2/Kp; Sun, 14 Feb 2010 19:11:07 GMT
아이디어가 있으십니까?
하는 데 도움이 난 그냥 성공적으로 텔넷 연결이 시간 인사말 전체 센드 메일을 받았습니다 네가 옳았다는 것 같아. – gomezuk