Set EMAIL_FROM_ADDRESS from env

This commit is contained in:
PCoder 2019-02-24 18:41:07 +01:00
commit 9ce45e6f56
2 changed files with 3 additions and 1 deletions

View file

@ -197,7 +197,7 @@ class ResetPassword(View):
# getting epoch for the time now in UTC to spare us headache with timezones
creationtime = int(datetime.utcnow().timestamp())
# Construct the data for the email
email_from = 'Userservice at ungleich <%s>' % config['EMAIL']['EMAILFROM']
email_from = settings.EMAIL_FROM_ADDRESS
to = ['%s <%s>' % (user, email)]
subject = 'Password reset request for %s' % user
link = self.build_reset_link(user, creationtime)