I think auth.messages.reset_password just has to be a string that has
%(key)s somewhere in it (for the reset key to be inserted). So, couldn't you
do something like
auth.messages.reset_password=response.render('admincms/register_email.html',some_context)
to generate the message?
Anthony
On Wednesday, September 14, 2011 2:57:08 AM UTC-4, annet wrote:
>
> I have a custom register function from which I send an html mail:
>
>
> @auth.requires_membership('Admin')
> def register_email(aanhef,last_name,email,username,password):
>
> context=dict(aanhef=aanhef,last_name=last_name,username=username,password=password)
>
>
> message=response.render('admincms/register_email.html',context)
> recipient=email
>
> boolean=mail.send(to=[recipient],subject='xxx',message=[None,message])
> return boolean
>
> register_email.html extends a maillayout which I would like to use
> when a user requests a reset_password or a retrieve_username.
>
> These are the current settings:
>
> auth.messages.retrieve_username_subject='Uw gebruikersnaam voor de
> toegang tot het Fitwise CMS'
> auth.messages.retrieve_username='Uw gebruikersnaam voor de toegang tot
> het Fitwise CMS is: %(username)s'
> auth.messages.reset_password_subject='Uw wachtwoord voor de toegang
> tot het Fitwise CMS'
> auth.messages.reset_password = 'Klik of kopieer/plak de volgende link
> http://'+request.env.http_host+URL(r=request,c='default',f='user',args=['reset_password'])+'/%(key)s
>
>
> in de adresbalk van uw browser. Stel via het formulier een nieuw
> wachtwoord in.'
>
> Is there a way to send these messages in maillayout.html
>
>
> Kind regards,
>
> Annet