Coverage for users/services.py: 38%
8 statements
« prev ^ index » next coverage.py v6.4.4, created at 2022-11-03 16:49 -0600
« prev ^ index » next coverage.py v6.4.4, created at 2022-11-03 16:49 -0600
1from django.conf import settings
2from app.sendgrid import SendgridClient
5def send_password_reset_email(user, url):
6 try:
7 sendgrid = SendgridClient(
8 to=user.email,
9 )
10 sendgrid.send_dynamic_email(
11 template_id=settings.SENDGRID_RESET_PASSWORD_TEMPLATE,
12 dynamic_template_data={
13 "name": user.name,
14 "url": url,
15 }
16 )
17 except Exception as e:
18 print(e)