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=['[email protected]'], 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='[email protected]'
mail.settings.login='[email protected]:**********'


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=['[email protected]'],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 [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to