On 20 Dec 2011, at 21:20, will trillich wrote:
Is there a (straightforward, hopefully :) way to buffer large
attachments when generating emails via a Catalyst View?
Yes, in the view code :_)
But you don't mean this, you mean 'in Catalyst::View::Email'
If we could use a combination of Template-Toolkit and Email::Stuff
which handles buffering nicely (hand it a $FH instead of content,
swee-ee-eet) that would be grand. It doesn't look like Email::MIME
(which Catalyst::View::Email builds upon) doesn't seem to expect
anything other than $body_content.
Time to not be using Catalyst::View::EMail then :)
I'd recommend just sub-classing either your existing (or a new) TT
view, and using around render => sub {... to do whatever you want with
Email::Stuff, taking the document you've just rendered with TT, and
the other attachments and doing the right thing.
Cheers
t0m
_______________________________________________
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/