you should use smtp if you send emails locally. especially if you do not 
know how to set up the environment for sending php mails using mail() etc
its always easier to use the smtp protocol then.
it also has the advantage to always be the same on every environment.


Am Dienstag, 7. August 2012 18:55:22 UTC+2 schrieb cricket:
>
> Does it work if you send the email from a controller? Does it work if 
> you send the email from a normal PHP script? 
>
> On Tue, Aug 7, 2012 at 6:09 AM, NewBie <tuanl...@gmail.com> wrote: 
> >  I write a Shell for sending email like this : 
> > 
> > <?php 
> > class SendMailShell extends Shell { 
> >     function main() { 
> >         App::import('Core', array('Controller')); 
> >         App::import('Component', array('Email')); 
> >         $this->Controller =& new Controller(); 
> >         $this->Email =& new EmailComponent(); 
> >         $this->Email->startup($this->Controller); 
> >         $this->Email->reset(); 
> >         $this->Email->to = 'Jonny <jo...@unita.net>'; 
> >         $this->Email->subject = "Subject"; 
> >         $this->Email->from = "jo...@unita.net"; 
> >         $this->Email->template = 'default'; 
> >         $this->Email->sendAs = "html"; 
> >         $this->Email->send(); 
> >     } 
> > } 
> > ?> 
> > 
> > ---- Program execute successfully, but Email do not send to 
> jo...@unita.net. 
> >      I research and do like some guild line in internet but not done. 
> >      Please help me! 
> > 
> > -- 
> > 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 
>

-- 
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+unsubscr...@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en-US.


Reply via email to