On 12 April 2011 00:50, Charlie Garrison wrote:
Good morning,
On 11/04/11 at 6:58 PM +0300, Octavian Rasnita wrote:
The TT templates used by the Catalyst app might contain many things
before I tried to make my own garden path.
Good morning,
On 11/04/11 at 6:58 PM +0300, Octavian Rasnita wrote:
The TT templates used by the Catalyst app might contain many things
like c.user, c.uri_for_action, may display images, may depend on other
templates which are loaded automaticly when those templates are
specified in the app config file. So there is no sane way of using
those wrapper templates for sending email from a cron job.
That was the conclusion I was reaching; I wanted feedback from otherstemplates which are loaded automaticly when those templates are
specified in the app config file. So there is no sane way of using
those wrapper templates for sending email from a cron job.
before I tried to make my own garden path.
independent from your controller so you can run it outside of Catalyst.
This article outlines how to do this
http://www.catalystframework.org/calendar/2007/14
If you need any web transaction details (c.user etc.) capture them at
request time and put them in an item in a queue (using ActiveMQ or similar).
Then in your cron script step through the queue entries, unpack the details
and do the template merge using TT2 before sending using Mail::Sender or
Email::Stuff or whatever.
You don't really need the Catalyst controller framework up and running to do
that.
Regards, Peter
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/catalyst/attachments/20110412/c2f77931/attachment.htm
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/catalyst/attachments/20110412/c2f77931/attachment.htm