SMTP GMAIL INTEGRATION CAKEPHP 1.4 Error

I have a CAKEPHP 1.3 application and my client was using for more than 10 years. Now there is a mail send issue with send mail So I changed my mail smtp with gmail.

$this->Email->subject = $data[‘subject’];
$this->Email->from = $data[‘from_name’]."<".$data[‘from_email’].">";
$this->Email->template = $data[‘template’];
$this->Email->sendAs = ‘html’;
$this->set(‘data’, $data);
$this->Email->smtpOptions = array(
‘host’ => ‘ssl://smtp.gmail.com’,
‘port’ => ‘465’,
‘timeout’=>‘30’,
‘auth’ => true,
‘username’ => GSMTP_USERNAME,
‘password’ => GSMTP_PASSWORD,
);

if(isset($data[‘attachments’]))
$this->Email->attachments = $data[‘attachments’];
$this->Email->delivery = ‘smtp’;
$this->Email->send();

Here I am not able to send mail using gmail. I am getting this error - 555 5.5.2 Syntax error. e21sm776806ioc.0 - gsmtp

Please help me to resolve this issue. Thanks.

Regards,

Someone please help me to resolve this?

I can’t remember if 1.3 had the required support to use SMTP over encrypted channels, or if there’s even anything required to be enabled here for port 465. That’s my only guess.