On Thursday, January 5, 2012 10:45:31 PM UTC-5, lucas wrote: > > yes, perfect and that makes perfect sense. > > hey anthony, what is the setting to email the mail.settings.login when > a user's registration is pending. meaning when a new user registers, > how do we setup web2py to email us so that we can erase pending under > the registration key? >
Maybe something like: auth.settings.register_onaccept = lambda form: mail.send(to=['[email protected]'], subject='Registration pending', message='New user (id = %s) waiting for approval' % form.vars.id) Note, that will introduce a slight delay for the user because it may take a second or two to send the email. An alternative is to queue the email for a background task: http://web2py.com/books/default/chapter/29/8#Sending-messages-using-a-background-task. Anthony

