Skip to content

Commit

Permalink
added welcome mail
Browse files Browse the repository at this point in the history
  • Loading branch information
jschiel committed Oct 26, 2023
1 parent 1a34cbf commit 87d760f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
6 changes: 6 additions & 0 deletions backend/mail.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,12 @@ def send_transfer_mails(from_name, from_alias, to_name, to_alias, from_message,
Dein Getränkelisten Team
""")

def send_welcome_mail(username):
mail=mail_from_username(username)
send_mail("Wilkommen zur Drinklist",mail,f"""Hallo,
du wurdest zur Drinklist hinzugefügt. Du kannst ab jetzt auf {util.domain} Getränke abstreichen.
""")


def compile_latex(name):
Expand Down
3 changes: 3 additions & 0 deletions backend/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -311,6 +311,9 @@ def post(self):
else:
db.add_user(request.json["name"],
request.json["money"], request.json["password"])

mail.send_welcome_mail(request.json["name"])

return util.build_response("User added")


Expand Down

0 comments on commit 87d760f

Please sign in to comment.