plugin account: fixed email sending

This commit is contained in:
Goffi 2019-10-11 16:15:34 +02:00
commit 995b777393

View file

@ -313,7 +313,8 @@ class MiscAccount(object):
# there is no email when an existing XMPP account is used
email=email or "<no email>",
)
d_admin = sat_email.sendEmail(self.host, admins_emails, subject, body)
d_admin = sat_email.sendEmail(
self.host.memory.config, admins_emails, subject, body)
admins_emails_txt = ", ".join(["<" + addr + ">" for addr in admins_emails])
d_admin.addCallbacks(
@ -341,7 +342,7 @@ class MiscAccount(object):
# XXX: this will not fail when the email address doesn't exist
# FIXME: check email reception to validate email given by the user
# FIXME: delete the profile if the email could not been sent?
d_user = sat_email.sendEmail(self.host, [email], subject, body)
d_user = sat_email.sendEmail(self.host.memory.config, [email], subject, body)
d_user.addCallbacks(
lambda __: log.debug(
"Account creation confirmation sent to <{}>".format(email)