diff --git a/core/signals.py b/core/signals.py index 120ca8d..fcf43af 100644 --- a/core/signals.py +++ b/core/signals.py @@ -104,8 +104,8 @@ def password_reset_token_created(sender, instance, reset_password_token, *args, send_mail( 'Password Reset for {title}'.format(title='diplomacy.gg'), email_plaintext_message, - 'noreply@diplomacy.gg', - ['to@example.com'], + getattr(settings, 'DIPLOMACY_EMAIL_FROM_ADDRESS', 'noreply@diplomacy.gg'), + [reset_password_token.user.email], fail_silently=False, html_message=email_html_message, ) diff --git a/project/settings/prod.py b/project/settings/prod.py index 5af70d8..3880cef 100644 --- a/project/settings/prod.py +++ b/project/settings/prod.py @@ -21,6 +21,7 @@ EMAIL_USE_TLS = True EMAIL_HOST_USER = 'apikey' EMAIL_HOST_PASSWORD = os.environ.get('SENDGRID_API_KEY') +DIPLOMACY_EMAIL_FROM_ADDRESS = os.environ.get('SENDGRID_EMAIL_FROM') LOGGING = { 'version': 1,