I think you are looking for the wrong solution to the problem.
You should just use
from gluon.template import render
mail.sent(to=...,message=render(content=...,context={..}))
On Jul 18, 4:47 am, Manuele Pesenti manuele.pese...@gmail.com wrote:
hi *,
I woulld like to reuse a controller
If you want to call the function from another function in the same
controller, you could do something like this:
def message():
# Code to create variables needed for output.
return dict(var1=...,var2=...,etc.)
def mail_sender():
# Call the message() function and render its output
for emails I used this, that allows you to place emails templates as views...
quite useful
http://wiki.web2py.com/Sending_Email_with_Plain_Text_HTML_Versions_plus_Attachments
On Mon, Jul 18, 2011 at 3:23 PM, Anthony abasta...@gmail.com wrote:
If you want to call the function from another
3 matches
Mail list logo