从phpmailer发送邮件正在工作,但cakephp邮件无法与saim cradienial一起工作

从phpmailer发送邮件正在工作,但cakephp邮件无法与saim cradienial一起工作,php,cakephp,cakephp-2.0,phpmailer,Php,Cakephp,Cakephp 2.0,Phpmailer,Hii我正在使用phpmailer发送邮件,它工作正常,但在cake php中它不工作。 请查看配置 对于PhpMailer: $mail = new PHPMailer; $mail->isSMTP(); $mail->SMTPDebug = 2; $mail->Debugoutput = 'html'; $mail->SMTPSecure = false; $mail->SMTPAuth = false; $mail->Host = "localhost

Hii我正在使用phpmailer发送邮件,它工作正常,但在cake php中它不工作。 请查看配置

对于PhpMailer:

$mail = new PHPMailer;
$mail->isSMTP();
$mail->SMTPDebug = 2;
$mail->Debugoutput = 'html';
$mail->SMTPSecure = false;
$mail->SMTPAuth = false; 
$mail->Host = "localhost";
$mail->Port = 25;
$mail->IsHTML(true);
$mail->Username = "order@domain.in";
$mail->Password = "password";
public $smtp = array(
    'transport' => 'Smtp',
    'from' => array('order@domain.in' => 'My domain'),
    'host' => 'localhost',
    'port' => 25,
    'timeout' => 30,
    'username' => 'order@domain.in',
    'password' => 'password',
    //'client' => null,
    //'log' => false,
);
对于CakePhp:

$mail = new PHPMailer;
$mail->isSMTP();
$mail->SMTPDebug = 2;
$mail->Debugoutput = 'html';
$mail->SMTPSecure = false;
$mail->SMTPAuth = false; 
$mail->Host = "localhost";
$mail->Port = 25;
$mail->IsHTML(true);
$mail->Username = "order@domain.in";
$mail->Password = "password";
public $smtp = array(
    'transport' => 'Smtp',
    'from' => array('order@domain.in' => 'My domain'),
    'host' => 'localhost',
    'port' => 25,
    'timeout' => 30,
    'username' => 'order@domain.in',
    'password' => 'password',
    //'client' => null,
    //'log' => false,
);
我发现以下是为Phpmailer做的工作

$mail->SMTPSecure = false;
$mail->SMTPAuth = false;

请任何人帮助我,cakephp中的SMTPSecureSMTPAuth的替代方法是什么?尝试将SSL参数作为数组传递到上下文中

 public $SendMail = array(
  'host' => 'smtp.host.com',
  'port' => 587, 
  'username' => 'username@domain.com',
  'password' => 'password',       
  'transport' => 'Smtp',
  'SMTPSecure' => 'tls',
  'tls' => true,
  'context'=>array('ssl' => array(
      'verify_peer' => false,
      'verify_peer_name' => false,
      'allow_self_signed' => true
    )), 
 );

尝试将端口号更改为587。