Re: Send email Shell Application
I recently upgraded from cakephp 2.0.6 to 2.1.1 and started having problem sending out nightly emails. I'm getting smtp connection time out errors. Nothing has changed on the email server, and emails generated from website forms are still working ... Is it possible that the connection is being dropped because of the malformed message id? http://cakephp.lighthouseapp.com/projects/42648/tickets/2698-cakeemail-messageid-in-cli-environment If so, how do I go about fixing this issue? -- 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: Send email Shell Application
@zuesman sry, but the component stuff is pretty misplayed here @Fernando as I mentioned before you need to make sure that all email settings have been passed on to the class. SMTP settings for instance (unless your server can use mail() right away). Am Dienstag, 3. April 2012 21:23:34 UTC+2 schrieb zuesman: > > This is from some old code, so I cannot guarantee it still works. I > think it was 1.2 code. > > class EmailShell extends Shell { > > var $view_vars = array(); > > public function __construct(&$dispatch) { > App::import('Core', 'Controller'); > App::import('Component', 'Email'); > $this->Controller =& new Controller(); > $this->Email = new EmailComponent(null); > $this->Email->initialize($this->Controller); > . > . > . > parent::__construct($dispatch); > > On Apr 2, 11:37 am, Fernando Andreacci wrote: > > The code: > > > > class EmailShell extends AppShell { #public $uses = array('Empresa', > > 'Licenca'); public function main() { App::uses('CakeEmail', > 'Network/Email'); > > $email = new CakeEmail(); $email->from(array('EMAIL' => 'EMAIL')); > $email > > ->to('EMAIL'); $email->subject('About'); $email->send('My message'); > $this > > ->out('OK'); } } > > > > > > > > > > > > > > > > > > > > On Mon, Apr 2, 2012 at 1:33 PM, euromark > wrote: > > > without seeing the code you already tried out so far it is impossible > to > > > help you > > > > > Am Montag, 2. April 2012 16:11:33 UTC+2 schrieb Fernando: > > > > >> euromark > > > > >> I could not figure out how to make it work, > > > > >> Can you help me with an example? > > > > >> -- > > >> Fernando Andreacci > > >> Biólogo > > >> Fone +55 47 9921 4015 > > >> fandrea...@gmail.com > > > > >> -- > > > Our newest site for the community: CakePHP Video Tutorials > > >http://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 > > > > -- > > Fernando Andreacci > > Biólogo > > Fone +55 47 9921 4015 > > fandrea...@gmail.com -- 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: Send email Shell Application
This is from some old code, so I cannot guarantee it still works. I think it was 1.2 code. class EmailShell extends Shell { var $view_vars = array(); public function __construct(&$dispatch) { App::import('Core', 'Controller'); App::import('Component', 'Email'); $this->Controller =& new Controller(); $this->Email = new EmailComponent(null); $this->Email->initialize($this->Controller); . . . parent::__construct($dispatch); On Apr 2, 11:37 am, Fernando Andreacci wrote: > The code: > > class EmailShell extends AppShell { #public $uses = array('Empresa', > 'Licenca'); public function main() { App::uses('CakeEmail', 'Network/Email'); > $email = new CakeEmail(); $email->from(array('EMAIL' => 'EMAIL')); $email > ->to('EMAIL'); $email->subject('About'); $email->send('My message'); $this > ->out('OK'); } } > > > > > > > > > > On Mon, Apr 2, 2012 at 1:33 PM, euromark wrote: > > without seeing the code you already tried out so far it is impossible to > > help you > > > Am Montag, 2. April 2012 16:11:33 UTC+2 schrieb Fernando: > > >> euromark > > >> I could not figure out how to make it work, > > >> Can you help me with an example? > > >> -- > >> Fernando Andreacci > >> Biólogo > >> Fone +55 47 9921 4015 > >> fandrea...@gmail.com > > >> -- > > Our newest site for the community: CakePHP Video Tutorials > >http://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 > > -- > Fernando Andreacci > Biólogo > Fone +55 47 9921 4015 > fandrea...@gmail.com -- 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: Send email Shell Application
The code: class EmailShell extends AppShell { #public $uses = array('Empresa', 'Licenca'); public function main() { App::uses('CakeEmail', 'Network/Email'); $email = new CakeEmail(); $email->from(array('EMAIL' => 'EMAIL')); $email ->to('EMAIL'); $email->subject('About'); $email->send('My message'); $this ->out('OK'); } } On Mon, Apr 2, 2012 at 1:33 PM, euromark wrote: > without seeing the code you already tried out so far it is impossible to > help you > > > Am Montag, 2. April 2012 16:11:33 UTC+2 schrieb Fernando: >> >> euromark >> >> I could not figure out how to make it work, >> >> Can you help me with an example? >> >> >> >> -- >> Fernando Andreacci >> Biólogo >> Fone +55 47 9921 4015 >> fandrea...@gmail.com >> >> -- > 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 > -- Fernando Andreacci Biólogo Fone +55 47 9921 4015 fandrea...@gmail.com -- 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: Send email Shell Application
without seeing the code you already tried out so far it is impossible to help you Am Montag, 2. April 2012 16:11:33 UTC+2 schrieb Fernando: > > euromark > > I could not figure out how to make it work, > > Can you help me with an example? > > > > -- > Fernando Andreacci > Biólogo > Fone +55 47 9921 4015 > fandrea...@gmail.com > > -- 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: Send email Shell Application
euromark I could not figure out how to make it work, Can you help me with an example? On Sat, Mar 31, 2012 at 6:01 AM, euromark wrote: > @LITTO CHACKO: > he wants to use it inside a shell, so he has to use the CakeEmail class > (and not the compontent!) > > take a look at this question (as he already figured it out pretty good): > http://ask.cakephp.org/questions/view/send_email_shell_application > the only thing missing is that he should pass some settings to the class > (in this case SMTP to send emails via this protocol) > other than that is is fully functional > > also note that you should set the domain manually for Emails sent via CLI > @see > http://cakephp.lighthouseapp.com/projects/42648/tickets/2698-cakeemail-messageid-in-cli-environment > > > Am Freitag, 30. März 2012 20:56:26 UTC+2 schrieb Fernando: > >> I'm using cake 2.1 and I need to send emails by a Shell Application. I >> found no documentation about it. How can I do it? > > -- > 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 > -- Fernando Andreacci Biólogo Fone +55 47 9921 4015 fandrea...@gmail.com -- 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: Send email Shell Application
@LITTO CHACKO: he wants to use it inside a shell, so he has to use the CakeEmail class (and not the compontent!) take a look at this question (as he already figured it out pretty good): http://ask.cakephp.org/questions/view/send_email_shell_application the only thing missing is that he should pass some settings to the class (in this case SMTP to send emails via this protocol) other than that is is fully functional also note that you should set the domain manually for Emails sent via CLI @see http://cakephp.lighthouseapp.com/projects/42648/tickets/2698-cakeemail-messageid-in-cli-environment Am Freitag, 30. März 2012 20:56:26 UTC+2 schrieb Fernando: > > I'm using cake 2.1 and I need to send emails by a Shell Application. I > found no documentation about it. How can I do it? -- 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: Send email Shell Application
Why don't you use the cakephp builtin component email it is nice and easy to use it can be include by:_ public $components = array('Session','Email'); and can be used to send email by:_ $pass = array('fullname'=>$name,'password'=>$p,'url'=>$url, 'reference'=>$reference,'email'=>$email); $this->set('emailValues',$pass); $this->Email->to = $email; $this->Email->subject = 'Welcome Mail from justdeals.com'; $this->Email->replyTo = 'no-re...@image.com'; $this->Email->from = 'no-reply'; $this->Email->template = 'account_created'; $this->Email->sendAs = 'html'; $this->Email->send(); you have a corresponding account_created.ctp(as in example) file in the folder views_>emails->html->... thanks ; Litto Chacko Axtec Softwares -- 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: Send email Shell Application
> I found no documentation about it. What means "it"? http://book.cakephp.org/2.0/en/console-and-shells.html http://book.cakephp.org/2.0/en/core-utility-libraries/email.html -- 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