# SMTP GMAIL INTEGRATION CAKEPHP 1.4 Error

**URL:** <https://discourse.cakephp.org/t/smtp-gmail-integration-cakephp-1-4-error/8607>\
**Category:** Need Help\
**Tags:** help\
**Created:** [November 11, 2020, 8:48am UTC](https://discourse.cakephp.org/t/smtp-gmail-integration-cakephp-1-4-error/8607 "2020-11-11T08:48:44Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![CakeDiscussion](https://avatars.discourse-cdn.com/v4/letter/c/c0e974/32.png) [@CakeDiscussion](https://discourse.cakephp.org/u/CakeDiscussion)\
**Post date:** [November 11, 2020, 8:48am UTC](https://discourse.cakephp.org/t/smtp-gmail-integration-cakephp-1-4-error/8607/1 "2020-11-11T08:48:44Z")

</div>

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,

---

<div class="post-metadata">

**Author:** ![CakeDiscussion](https://avatars.discourse-cdn.com/v4/letter/c/c0e974/32.png) [@CakeDiscussion](https://discourse.cakephp.org/u/CakeDiscussion)\
**Post date:** [November 12, 2020, 6:25am UTC](https://discourse.cakephp.org/t/smtp-gmail-integration-cakephp-1-4-error/8607/2 "2020-11-12T06:25:03Z")

</div>

Someone please help me to resolve this?

---

<div class="post-metadata">

**Author:** ![Zuluru](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.cakephp.org/zuluru/32/1230_2.png) [@Zuluru](https://discourse.cakephp.org/u/Zuluru)\
**Post date:** [November 12, 2020, 7:05pm UTC](https://discourse.cakephp.org/t/smtp-gmail-integration-cakephp-1-4-error/8607/3 "2020-11-12T19:05:35Z")

</div>

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.
