Re: Figuring out CakeEmail in Cakephp 2.0

2011-10-24 Thread fly2279
I debugged the MailTransport.php in the core and then debugged php's
mail function. Turns out it was giving an error for smtp server. I
changed my php.ini to reflect my isp and all works well now. I'll
leave the original post in case anyone else has this problem and can't
figure out why because cake only returns a 500 error.

On Oct 23, 10:33 pm, fly2279  wrote:
> I'm trying to figure out how to use the new CakeEmail class in cakephp
> 2.0. I've used the cookbook to configure everything and just try to
> send a simple test email but I keep getting an internal server error.
>
> Here's the code I'm using to send a basic email:
>
> $email = new CakeEmail();
> debug($email->from('kennethf...@gmail.com')->to('kennethf...@gmail.com')->subject('Welcome')->send('Hello!
>  This is
>
> my message to the new user.'));
>
> All I seem to be able to get is an internal server error with the
> following stack trace:
>
> #0 C:\xampp\cake-2.0\lib\Cake\Network\Email\CakeEmail.php(959):
> MailTransport->send(Object(CakeEmail))
> #1 C:\xampp\cakeapps\app\Controller\UsersController.php(222):
> CakeEmail->send('Hello! This is ...')
> #2 [internal function]: UsersController->admin_email()
> #3 C:\xampp\cake-2.0\lib\Cake\Controller\Controller.php(473):
> ReflectionMethod->invokeArgs(Object(UsersController), Array)
> #4 C:\xampp\cake-2.0\lib\Cake\Routing\Dispatcher.php(107): 
> Controller->invokeAction(Object(CakeRequest))
>
> #5 C:\xampp\cake-2.0\lib\Cake\Routing\Dispatcher.php(89): 
> Dispatcher->_invoke(Object(UsersController), Object(CakeRequest),
>
> Object(CakeResponse))
> #6 C:\xampp\htdocs\index.php(99): Dispatcher->dispatch(Object(CakeRequest), 
> Object(CakeResponse))
>
> #7 {main}
>
> What am I doing wrong?

-- 
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+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: Figuring out CakeEmail in Cakephp 2.0

2011-10-24 Thread fly2279
Yes I have.


On Oct 23, 10:56 pm, Graham Weldon  wrote:
>  Did you create an email configuration file?
>
> app/Config/email.php
>
> There is a default one at: app/Config/email.php.default
>
> Cheers,
> Graham Weldon
>
>
>
>
>
>
>
> On Monday, 24 October 2011 at 2:33 PM, fly2279 wrote:
> > I'm trying to figure out how to use the new CakeEmail class in cakephp
> > 2.0. I've used the cookbook to configure everything and just try to
> > send a simple test email but I keep getting an internal server error.
>
> > Here's the code I'm using to send a basic email:
>
> > $email = new CakeEmail();
> > debug($email->from('kennethf...@gmail.com (mailto:kennethf...@gmail.com)')-
> > > to('kennethf...@gmail.com 
> > > (mailto:kennethf...@gmail.com)')->subject('Welcome')->send('Hello! This is
> > my message to the new user.'));
>
> > All I seem to be able to get is an internal server error with the
> > following stack trace:
>
> > #0 C:\xampp\cake-2.0\lib\Cake\Network\Email\CakeEmail.php(959):
> > MailTransport->send(Object(CakeEmail))
> > #1 C:\xampp\cakeapps\app\Controller\UsersController.php(222):
> > CakeEmail->send('Hello! This is ...')
> > #2 [internal function]: UsersController->admin_email()
> > #3 C:\xampp\cake-2.0\lib\Cake\Controller\Controller.php(473):
> > ReflectionMethod->invokeArgs(Object(UsersController), Array)
> > #4 C:\xampp\cake-2.0\lib\Cake\Routing\Dispatcher.php(107): Controller-
> > > invokeAction(Object(CakeRequest))
> > #5 C:\xampp\cake-2.0\lib\Cake\Routing\Dispatcher.php(89): Dispatcher-
> > > _invoke(Object(UsersController), Object(CakeRequest),
> > Object(CakeResponse))
> > #6 C:\xampp\htdocs\index.php(99): Dispatcher-
> > > dispatch(Object(CakeRequest), Object(CakeResponse))
> > #7 {main}
>
> > What am I doing wrong?
>
> > --
> > Our newest site for the community: CakePHP Video 
> > Tutorialshttp://tv.cakephp.org
> > Check out the new CakePHP Questions sitehttp://ask.cakephp.organd help 
> > others with their CakePHP related questions.
>
> > To unsubscribe from this group, send email to
> > cake-php+unsubscr...@googlegroups.com For more options, visit this group 
> > athttp://groups.google.com/group/cake-php

-- 
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+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: Figuring out CakeEmail in Cakephp 2.0

2011-10-23 Thread Graham Weldon
 Did you create an email configuration file? 

app/Config/email.php

There is a default one at: app/Config/email.php.default 

Cheers,
Graham Weldon


On Monday, 24 October 2011 at 2:33 PM, fly2279 wrote: 
> I'm trying to figure out how to use the new CakeEmail class in cakephp
> 2.0. I've used the cookbook to configure everything and just try to
> send a simple test email but I keep getting an internal server error.
> 
> Here's the code I'm using to send a basic email:
> 
> $email = new CakeEmail();
> debug($email->from('kennethf...@gmail.com (mailto:kennethf...@gmail.com)')-
> > to('kennethf...@gmail.com 
> > (mailto:kennethf...@gmail.com)')->subject('Welcome')->send('Hello! This is
> my message to the new user.'));
> 
> 
> All I seem to be able to get is an internal server error with the
> following stack trace:
> 
> #0 C:\xampp\cake-2.0\lib\Cake\Network\Email\CakeEmail.php(959):
> MailTransport->send(Object(CakeEmail))
> #1 C:\xampp\cakeapps\app\Controller\UsersController.php(222):
> CakeEmail->send('Hello! This is ...')
> #2 [internal function]: UsersController->admin_email()
> #3 C:\xampp\cake-2.0\lib\Cake\Controller\Controller.php(473):
> ReflectionMethod->invokeArgs(Object(UsersController), Array)
> #4 C:\xampp\cake-2.0\lib\Cake\Routing\Dispatcher.php(107): Controller-
> > invokeAction(Object(CakeRequest))
> #5 C:\xampp\cake-2.0\lib\Cake\Routing\Dispatcher.php(89): Dispatcher-
> > _invoke(Object(UsersController), Object(CakeRequest),
> Object(CakeResponse))
> #6 C:\xampp\htdocs\index.php(99): Dispatcher-
> > dispatch(Object(CakeRequest), Object(CakeResponse))
> #7 {main}
> 
> What am I doing wrong?
> 
> -- 
> 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+unsubscr...@googlegroups.com For more options, visit this group at 
> http://groups.google.com/group/cake-php

-- 
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+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php