Friday, April 3, 2009

Re: Need Help of Email component - fail to send email

Any one can give an example configure if you have succeed on this?

On Fri, Apr 3, 2009 at 11:42 PM, joshua <joshokn@gmail.com> wrote:
I try every way that I can find to send email from my gmail account or yahoo account , but both of them are failed. I use cake Email component to send.
###################################################
$this->Email->smtpOptions = array(
            'port' => '25',//for gmail 465
            'timeout' => '30',
            'host' => 'smtp.yahoo.com', // for gmail ssl://smtp.gmail.com
            'username' => 'xxx@yahoo.com', //xxx@gmail.com
            'password' => 'xxxxxxx');
        $this->Email->delivery = 'smtp';
        $this->Email->to = 'yyyyyy@hotmail.com';// or 'yyyyy@gmail.com'
        $this->Email->subject = 'Thanks';
        $this->Email->replyTo = 'support@example.com';
        $this->Email->from = 'Example <noreply@example.com>';
        $this->Email->template = 'simple'; // note no '.ctp'
        $result = $this->Email->send();
        debug($this->Email->smtpError);
###################################################

--
Thanks
Joshua



--
Thanks
Joshua

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to cake-php+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

No comments: