Register: Fix behaviour on email conflict, add password suggestion

This commit is contained in:
rubenwardy
2020-12-05 00:01:36 +00:00
parent 43aab057c8
commit f7d90f2f53
3 changed files with 26 additions and 14 deletions

View File

@@ -41,11 +41,11 @@ def sendVerifyEmail(newEmail, token):
mail.send(msg)
@celery.task()
def sendEmailRaw(to, subject, text, html):
def sendEmailRaw(to, subject, text, html=None):
from flask_mail import Message
msg = Message(subject, recipients=to)
msg.body = text or html
msg.body = text
html = html or text
msg.html = render_template("emails/base.html", subject=subject, content=html)
mail.send(msg)