![]() |
sending email via gmail - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5) +--- Forum: General Help (https://forum.codeigniter.com/forumdisplay.php?fid=24) +--- Thread: sending email via gmail (/showthread.php?tid=73511) |
sending email via gmail - emanuele.zamengo - 05-02-2019 I'm trying to send emails with gmail attachment but codeigniter always gives me the error: to: 555 5.5.2 Syntax error. n2sm18426280wra.89 - gsmtp The following SMTP error was encountered: 555 5.5.2 Syntax error. n2sm18426280wra.89 - gsmtp in any case, however, the email arrives correctly at its destination! below is the code I use to send PHP Code: function sendEmail($to = '', $subject = '', $body = '', $attachment = '') { RE: sending email via gmail - php_rocs - 05-02-2019 @emanuele.zamengo Try this link: https://stackoverflow.com/questions/4421866/cakephp-smtp-emails-syntax-error RE: sending email via gmail - InsiteFX - 05-02-2019 PHP Code: $config = array(); RE: sending email via gmail - emanuele.zamengo - 05-02-2019 (05-02-2019, 06:46 AM)php_rocs Wrote: @emanuele.zamengo thanks in this way it works !! RE: sending email via gmail - php_rocs - 05-02-2019 @emanuele.zamengo Awesome, glad I could assist. RE: sending email via gmail - emanuele.zamengo - 05-03-2019 (05-02-2019, 10:28 AM)php_rocs Wrote: @emanuele.zamengo I ask one last thing: if I manually set the recipient address in this way PHP Code: $ Controller-> Email-> to ('<[[email protected]>']test.test@gmail.com>'[/email]); everything works correctly if instead I compose it like this: PHP Code: $ Controller-> Email-> to ('<'. $ To. '>'); from error anyway! where's the problem? RE: sending email via gmail - php_rocs - 05-03-2019 @emanuele.zamengo, Then this tells me that only the first solution works and maybe there was a change to what is acceptable by Google. RE: sending email via gmail - emanuele.zamengo - 05-04-2019 (05-03-2019, 05:15 PM)php_rocs Wrote: @emanuele.zamengo, yes! |