Monday, February 27, 2012

Socket Connection exception while attempting to use CakeEmail

Hi all,

I am not sure how to fix this socketException while making an
attempt to post an email. Thanks for the help. Do I need to touch
anything in php.ini file.

CakeLog::write('debug', 'Something did not work');
$email = new CakeEmail();
$email->from(array('p_perumal@hotmail.com' => 'My Site'));
$email->to('aarthie@yahoo.com');
$email->subject('First message from Tamil Padam');
$email->send('Just check this tamil padam site');

2012-02-27 21:03:02 Error: [SocketException] Could not send email.
#0 C:\www\tamilpadam\lib\Cake\Network\Email\CakeEmail.php(967):
MailTransport->send(Object(CakeEmail))
#1 C:\www\tamilpadam\app\Controller\Firstpagescontroller.php(38):
CakeEmail->send('Just check this...')
#2 [internal function]: Firstpagescontroller->email_myfriend()
#3 C:\www\tamilpadam\lib\Cake\Controller\Controller.php(473):
ReflectionMethod->invokeArgs(Object(Firstpagescontroller), Array)
#4 C:\www\tamilpadam\lib\Cake\Routing\Dispatcher.php(104): Controller-
>invokeAction(Object(CakeRequest))
#5 C:\www\tamilpadam\lib\Cake\Routing\Dispatcher.php(86): Dispatcher-
>_invoke(Object(Firstpagescontroller), Object(CakeRequest),
Object(CakeResponse))
#6 C:\www\tamilpadam\app\webroot\index.php(96): Dispatcher-
>dispatch(Object(CakeRequest), Object(CakeResponse))
#7 {main}

--
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: