Yes, you can, here is an example
# import required modules
from gluon.tool import Mail
# configure Mailer
mail=Mail()
mail.settings.server='smtp.gmail.com:587'
mail.settings.sender='...@somewhere.com'
mail.settings.login=None or 'username:password'
context=dict(a=1,b=2,c=3,etc="etc")
message=response.render('file.html',context)
# send the message
mail.send(to=['who@example.com'],subject='None',message=message)
Here context is a dictionary that contains variables visible by the template file.
Massimo