How to customize email settings.

41 views
Skip to first unread message

Warwick JC

unread,
Dec 2, 2020, 11:17:56 AM12/2/20
to web2py-users
I recently successfully used the configured email settings as follows:

mail = auth.settings.mailer
mail.settings.server = 'smtp.gmail.com:587'
mail.settings.sender = 'user...@gmail.com'
auth.settings.registration_requires_verification = True

I noted that the email arrived with the sender name in lower caps and using the email names (e.g. if user...@gmail.com the name appears as username and not user name).
I would like it to appear like: 'User Name' and not 'username'.
Kind regards.

Annet

unread,
Dec 4, 2020, 5:03:16 AM12/4/20
to web2py-users
Maybe auth.messages is what you're looking for:

auth.messages.retrieve_username = 'Your user name: %(username)s'
auth.messages.retrieve_username_subject = 'Username retrieval'
auth.messages.reset_password = 'Click or copy/paste the following link https://'+request.env.http_host+URL('default', 'user', args='reset_password')+'?key=%(key)s to the address bar of your browser. Use the form to set a new password'
auth.messages.reset_password_subject = 'Password reset: '


Kind regards,

Annet
Op woensdag 2 december 2020 om 17:17:56 UTC+1 schreef lbjc...@gmail.com:
Reply all
Reply to author
Forward
0 new messages