Question

In Lithium documentation is written that *View::$_request*

"Holds the details of the current request that originated the call to this view, if applicable. May be empty if this does not apply. For example, if the View class is created to render an email."

But how to use a view to render an email? It is possible to instantiate a view and not send it to the browser, but get the content and send it with mail()?

Was it helpful?

Solution

Take a look to li3_mailer plugin.

From the docs, an answer to your question :

Rendering email messsages is similar to rendering responses with a few exceptions. The most important is that instead of having a request which can be negotiated to infer the most suitable (single) type for response the email message may have multiple types (and does not have a 'corresponding' request). To support this the plugin implements a mail Media class simlar to http's Media, which can be used to register new types or configure the built-ins.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top