Tuesday, April 3, 2012

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

No comments: