email - 555 5.5.2 Syntax error. gmail's smtp -


do know syntax error refering?

here's code i'm using cakephp

 $user = $this->user->read(null,$id);     $this->email->to = array('name@gmail.com');;      $this->email->from = 'name@gmail.com';     $this->email->subject = 'welcome our cool thing';     $this->email->template = 'simple_message';       $this->email->sendas = 'both';       $this->email->smtpoptions = array(         'port'=>'465',          'timeout'=>'30',         'auth' => true,         'host' => 'ssl://smtp.gmail.com',         'username'=>'name@gmail.com',         'password'=>'********',     );     $this->set('user', $user);     $this->email->delivery = 'smtp';     $this->email->send(); 

note i'm sending email myself test porpuses

this question asked here: cakephp smtp emails syntax error

here rabidfire's (correct) answer:

google's smtp requires format email addresses in following way:

recipient name <myname@example.com>

do both , address, , should go. if don't have name of user, can repeat email:

$this->email->to = "my_test_mail@centrum.cz <my_test_mail@centrum.cz>";


Comments

Popular posts from this blog

asp.net - repeatedly call AddImageUrl(url) to assemble pdf document -

java - Android recognize cell phone with keyboard or not? -

iphone - How would you achieve a LED Scrolling effect? -