In one of my applications I have an e-mail form, which for a lack of
knowledge is sent to my mail box using the following code in the
function:


mail.send(to=['annet.v...@gmail.com'], subject=form.vars.onderwerp,
message=form.vars)


In db.py I have got:

from gluon.tools import Mail

mail=Mail()
mail.settings.server='smtp.gmail.com:587'
mail.settings.sender='annet.v...@gmail.com'
mail.settings.login='annet.v...@gmail.com:**********'


When I want to use a template to layout the mail, where do these lines
of code go:

from gluon.template import parse_template

path=os.path.join(request.folder,"views")
context=dict(a=1,b=2,c=3,etc="etc")
message=parse_template('file.html',path=path,context=context)
mail.send(to=['....@whatever.com'],subject='None',message=message)


... and what is the meaning of context=dict(...)


Kind regards,

Annet
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to