Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom email template #71

Open
lijoev opened this issue Aug 26, 2020 · 1 comment
Open

Custom email template #71

lijoev opened this issue Aug 26, 2020 · 1 comment

Comments

@lijoev
Copy link

lijoev commented Aug 26, 2020

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

@jaymes15
Copy link

'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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants