from templated_email import send_templated_mail
from django.contrib.auth.tokens import default_token_generator
def send_activation_mail(user):
token = default_token_generator.make_token(user)
print('token ---->', token)
send_templated_mail(
template_name='welcome',
from_email='noreply@muncho.app',
recipient_list=user.email,
context={
'full_name':user.first_name
},
)
return token
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/4a66a8f3-c97a-46bc-af1c-c7b44ffe8dd1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
No comments:
Post a Comment