Search code examples
web2py

Web2py custom email verification text


How to customize the default text on the email verification of Web2py? Right now it is: Welcome blabla! Click on the link blabla to verify your email. The link is not a link it is just a text that needs to be copied to the browser.


Solution

  • The various messages presented by the Auth system are in auth.messages. For the verification email body, the relevant message is auth.messages.verify_email, which defaults to:

    'Welcome %(username)s! Click on the link %(link)s to verify your email'
    

    The format string can include specifiers for any of the registration form fields (e.g., first_name, last_name, username, email) as well as the link URL (as shown above).

    See http://web2py.com/books/default/chapter/29/09/access-control#Auth-Settings-and-messages.