Tuesday, September 16, 2008

Re: Email component Rendering

Thanks Sam,
nice tip, i didn't saw that parameter.

I was now looking at the code of EmailComponent, and at the
end of the send method there is:

$__method = '__'.$this->delivery;
return $this->$__method();

So it maybe safe to extend EmailComponent with a custom class
implementing some additional delivery methods like __preview() or
similar, in order to get the desired data as output.
This becasue the __debug() method sets a Session Flash message
containing a single html string formatted like: <pre> ....[[data]]...
</pre>
and it is useful just for debug as well.


Kappa

On Sep 16, 2:09 am, "Samuel DeVore" <sdev...@gmail.com> wrote:
> you can set the $delivery to 'debug'
>
> http://book.cakephp.org/view/270/Class-Attributes-and-Variables
>
> Sam D
> --
> (the old fart) the advice is free, the lack of crankiness will cost you
>
> - its a fine line between a real question and an idiot
>
> http://blog.samdevore.com/archives/2007/03/05/when-open-source-bugs-me/http://blog.samdevore.com/cakephp-pages/my-cake-wont-bake/http://blog.samdevore.com/cakephp-pages/i-cant-bake/
>
> On Mon, Sep 15, 2008 at 3:52 PM, Kappa <andrea.cappalu...@gmail.com> wrote:
>
> > Hi all,
> > i'm experiencing some difficulty with the Email component.
> > It's the first time i'm using it, and my question is:
>
> > is it possible to "catch" the rendered layout of the email,
> > in order for example to store it some where, or to preview it?
>
> > thanks,
> >   Kappa

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
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?hl=en
-~----------~----~----~----~------~----~------~--~---

No comments: