Thanks Jamie, that helps...

Could you also help me with the following?

using get_partial() or get_module() now gives an error:
the 'default' context does not exist


Thanks,
James

On 3 nov, 14:34, "[EMAIL PROTECTED]"
<[EMAIL PROTECTED]> wrote:
> sfLoader::loadHelpers('Partial');
>
> -- Jamie
>
> On 3 Nov, 12:53, James Cauwelier <[EMAIL PROTECTED]> wrote:
>
> > Hi,
>
> > I want to send emails from a task, but need the partialhelper to be
> > available in this class.  The cookbook on the symfony site is rather
> > vague about this.  Can somebody show me some working code for emailing
> > from a task?
>
> > Here is some of my task code:
>
> > protected function execute($arguments = array(), $options = array())
> >   {
> >     // Database initialization
> >     $databaseManager = new sfDatabaseManager($this->configuration);
> >     $connection = Propel::getConnection($options['connection'] ?
> > $options['connection'] : '');
> >     // add code here
>
> >                 // retrieve all accounts that need activation
> >                 $c = new Criteria;
> >                 $c->add (ClientActivationQueuePeer::SENT, false);
> >                 $activation_count = ClientActivationQueuePeer::doCount ($c,
> > $connection);
>
> >                 // including the partial helper
> >                 // DOES NOT WORK
> >                 use_helper ('Partial');
>
> >                 while ($activation_count > 0)
> >                 {
> >                         // get_component() as advised in the cookbook
> > section of the documentation
> >                         // DOES NOT WORK
> >                         $mailbody = get_component ('mailer', 
> > 'activateClient');
>
> >                         $activation_count = 
> > ClientActivationQueuePeer::doCount ($c);
> >                 }
> >   }
>
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to