django-rest-framework-passwordless icon indicating copy to clipboard operation
django-rest-framework-passwordless copied to clipboard

Custom email template

Open lijoev opened this issue 4 years ago • 1 comments

I have added a custom email template for token email. inside template folder and I have mentioned it in the settings but it is not sending the email with that template

lijoev avatar Aug 26 '20 12:08 lijoev

'PASSWORDLESS_EMAIL_TOKEN_HTML_TEMPLATE_NAME': "core/auth.html"

that is:

`PASSWORDLESS_AUTH = {

'PASSWORDLESS_AUTH_TYPES': ['EMAIL', 'MOBILE'],
'PASSWORDLESS_EMAIL_NOREPLY_ADDRESS': DEFAULT_FROM_EMAIL,
'PASSWORDLESS_USER_MOBILE_FIELD_NAME': 'mobile',
'PASSWORDLESS_MOBILE_NOREPLY_NUMBER': \
    os.environ.get('TWILIO_PHONE_NUMBER'),
'PASSWORDLESS_USER_MARK_MOBILE_VERIFIED': True,
'PASSWORDLESS_USER_MOBILE_VERIFIED_FIELD_NAME': 'mobile_verified',
'PASSWORDLESS_USER_MARK_EMAIL_VERIFIED': True,
'PASSWORDLESS_USER_EMAIL_VERIFIED_FIELD_NAME': 'email_verified',

'PASSWORDLESS_EMAIL_TOKEN_HTML_TEMPLATE_NAME': "core/auth.html"

}`

in my case I created a app named core. inside my core app, I created another folder named template. inside the template folder I created another folder and named it after the app(which in my case is core). then I created my html template which in my case is auth.html so the folder structure would be:

core(app)/template/core(app)/auth.html(html template) Screen Shot 2021-09-17 at 8 51 09 AM

jaymes15 avatar Sep 17 '21 07:09 jaymes15