Do I insert this code in my model (db.py)?

my auth.setting.register_onaccept = lambda form: 
mail.send(to=['x...@xxx.net'],
          subject='web2py registration',
          # If reply_to is omitted, then mail.settings.sender is used
          reply_to='u...@example.com',
          message= u'A new user has been created on database %s and has to 
be confirmed' % (database)) ##### Here I want to add user Name and surname 
and his email

On Thursday, January 24, 2013 12:59:32 PM UTC+1, rochacbruno wrote:
>
> def myfunc(form):
> # here you get form.vars 
>
> auth.settings.register_onaccept = myfunc 
> Em 24/01/2013 06:24, "Yebach" <vid....@gmail.com <javascript:>> escreveu:
>
>> Hello
>>
>> After a new user registers, I would like to send his data to my email 
>> (user email and database where it was created)
>> I have user requires confirmation set to true and I have a couple of 
>> databases so that is a must, also to check on user I need to get his e-mail 
>> to inform him his registration was confirmed
>>
>> thank you
>>
>> best regards
>>
>> -- 
>>  
>>  
>>  
>>
>

-- 



Reply via email to