Re: [web2py] Send Email After Registration

2012-09-24 Thread Yebach
For controler you mean the user controler? Or do I create a new one? this is my current user controler def user(): form = auth() if request.vars.msg: response.flash = " 'u'Registracija je v postopku odobritve. Ko bo vaš račun potrjen boste o tem obveščeni preko e-maila." #

Re: [web2py] Send Email After Registration

2012-09-21 Thread hasan alnator
Sorry i mean in db.py : auth.settings.register_next = URL('index',vars={'msg':'welcome'}) Best Regards, On Fri, Sep 21, 2012 at 5:21 PM, hasan alnator wrote: > Dear Yebach , > > in db.py : > > auth.settings.register_next = URL('Welcome',vars={'msg':'welcome'}) > > in controller : > > def ind

Re: [web2py] Send Email After Registration

2012-09-21 Thread hasan alnator
Dear Yebach , in db.py : auth.settings.register_next = URL('Welcome',vars={'msg':'welcome'}) in controller : def index(): if request.vars.msg: response.flash = " 'u'Registracija je v postopku odobritve. Ko bo vaš račun potrjen boste o tem obveščeni preko e-maila." return locals() On Fr

Re: [web2py] Send Email After Registration

2012-09-20 Thread Yebach
I have a auth.settings.registration_requires_approval = True I just want that after a user registers a message would be printed smth like: "Your registration is being processed...bla bla bal" I set the parameter auth.messages.registration_pending = u'Registracija je v postopku odobritve. Ko

Re: [web2py] Send Email After Registration

2012-09-20 Thread Alec Taylor
Throw in a decorator to that function @auth.requires_login() On Fri, Sep 21, 2012 at 12:15 AM, hasan alnator wrote: > Dear Yebach , > > Are you logged in ? > > Best Regards, > > > On Thu, Sep 20, 2012 at 5:13 PM, Yebach wrote: >> >> Hello >> >> I am getting an error >> >> User_Email = auth.u

Re: [web2py] Send Email After Registration

2012-09-20 Thread hasan alnator
Dear Yebach , Are you logged in ? Best Regards, On Thu, Sep 20, 2012 at 5:13 PM, Yebach wrote: > Hello > > I am getting an error > > User_Email = auth.user.email > AttributeError: 'NoneType' object has no attribute 'email' > > > > > On Thursday, September 20, 2012 11:15:31 AM UTC+2, Alec Ta

Re: [web2py] Send Email After Registration

2012-09-20 Thread Yebach
Hello I am getting an error User_Email = auth.user.email AttributeError: 'NoneType' object has no attribute 'email' On Thursday, September 20, 2012 11:15:31 AM UTC+2, Alec Taylor wrote: > > Nicely done. > > On Thu, Sep 20, 2012 at 7:13 PM, hasan alnator > > wrote: > > Ok I DID it like th

Re: [web2py] Send Email After Registration

2012-09-20 Thread Alec Taylor
Nicely done. On Thu, Sep 20, 2012 at 7:13 PM, hasan alnator wrote: > Ok I DID it like this : > > auth.settings.register_next = URL('Welcome') > > def Welcome(): > User_Email = auth.user.email > mail.send(User_Email,'Welcome To website','Welcome To website') > if request.vars.lan == 'E

Re: [web2py] Send Email After Registration

2012-09-20 Thread hasan alnator
Ok I DID it like this : auth.settings.register_next = URL('Welcome') def Welcome(): User_Email = auth.user.email mail.send(User_Email,'Welcome To website','Welcome To website') if request.vars.lan == 'En': redirect('index',vars={'lan':'En'}) else: redirect('index')

Re: [web2py] Send Email After Registration

2012-09-20 Thread hasan alnator
Dear Alec , I Dont want email verification , i just want to send an email that says welcome . Best Regards, --

Re: [web2py] Send Email After Registration

2012-09-20 Thread Alec Taylor
Isn't there an example in the scaffolding app? https://github.com/web2py/web2py/blob/master/gluon/tools.py#L816 Just set that to True (in your db.py), and it will require verification. If you want to send an email not for verification, just scroll down to the code for verification and edit it to

[web2py] Send Email After Registration

2012-09-20 Thread Hassan Alnatour
Dear ALL, How can I send an email to the user after he registers automatically ? Best Regards, --