On Sunday, April 26, 2015 at 4:07:40 PM UTC-4, Gael Princivalle wrote:
>
> Hi all.
>
> I would like to customize emails that web2py send to the user for email 
> verification and password change.
> For example now I have for email verification:
> Welcome myem...@mydomain.com! Click on the link http... to verify your 
> email
>

auth.messages.verify_email and auth.messages.verify_email_subject. The 
former can contain string formatting keys with the names of any fields in 
the registration form as well as "link" (e.g., "Welcome %(first_name)s 
%(last_name)s. Click on the link %(link)s to verify your email.").
 

> Another thing, how is it possible to have the last registered user row in 
> auth.settings.register_onaccept?
> I would like to send an email when a new user sign in.
> auth.settings.register_onaccept = lambda user: mail.send(to='
> my_email@my_domain.com',subject='New user on 
> my_domain.com',message='<html>New 
> user on my_domain.com<br/>' + user.first_name + '</html>')
>

The form object is passed to register_onaccept, so you can access all the 
values entered by the user via form.vars (i.e., form.vars.email, 
form.vars.first_name, etc.).

Anthony

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to