def welcome(form):
    auth.settings.mailer.send(to=form.vars.email,message='Hello %s'
%form.vars.first_name)
auth.settings.register_onaccept = welcome

Massimo

On Jul 10, 6:14 pm, Jason Brower <encomp...@gmail.com> wrote:
> Hmm I get an error. it tells me that there is no sent method.
>
> Traceback (most recent call last):   File
> "/home/encompass/Desktop/web2py/gluon/restricted.py", line 176, in
> restricted     exec ccode in environment   File
> "/home/encompass/Desktop/web2py/applications/gbata/controllers/default.py", 
> line 202, in <module>   File 
> "/home/encompass/Desktop/web2py/gluon/globals.py", line 103, in <lambda>     
> self._caller = lambda f: f()   File 
> "/home/encompass/Desktop/web2py/applications/gbata/controllers/default.py", 
> line 159, in user     return dict(form = auth())   File 
> "/home/encompass/Desktop/web2py/gluon/tools.py", line 466, in __call__     
> return self.register()   File 
> "/home/encompass/Desktop/web2py/gluon/tools.py", line 915, in register     
> onaccept(form)   File 
> "/home/encompass/Desktop/web2py/applications/gbata/controllers/default.py", 
> line 13, in welcome     auth.settings.mailer.sent(to=form.vars.email, 
> message='Hello %s' % form.vars.first_name) AttributeError: 'Mail' object has 
> no attribute 'sent'
> Any ideas?
> Regards,
> JAson
>
> On Fri, 2009-07-10 at 09:56 -0700, mdipierro wrote:
> > def welcome(form):
> >     auth.settings.mailer.sent(to=form.vars.email,message='Hello %s' %
> > form.vars.first_name)
>
> > auth.settings.register_onaccept = welcome
>
> > Need to add this to the book. Thanks for the reminder.
>
> > Massimo
>
> > On Jul 10, 2:25 pm, Jason Brower <encomp...@gmail.com> wrote:
> > > Is there a way with auth to send a welcome message when people register?
> > > Regards,
> > > JAson
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to