Thursday, February 2, 2012

Conection Time Out with CakeEmail()

Hi Guys, I have a problem when I tried to send Email, cakephp show me
this message "Connection timed out Error: An Internal Error Has
Occurred."

I have this Code.

\\app\Config\email.php

public $smtp = array(
'transport' => 'Smtp',
'from' => array('mydir@mydomain.com' => 'My Name),
'host' => 'mail.mydomain.com',
'port' => 26,
'timeout' => 30,
'username' => 'my_username',
'password' => 'my_password',
'client' => null,
'log' => false
//'charset' => 'utf-8',
//'headerCharset' => 'utf-8',
);

end in my Controller I have this code.

class TestController extends AppController {

function sendmails() {
$email = new CakeEmail('smtp');
$email->template('my_template')
->emailFormat('both')
->to('detination_address@gmail.com')
->send();
}
}

en when I can't send the email, when I call this Action in Test
Controller www.mydomain.com/Test/sendmails.
I want to know if my configuration it's alright, and why I can't send
mails.
bye bye

--
Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions.


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

No comments: