Fixed hook for mail sending

This commit is contained in:
Ferdinand Thiessen 2021-01-18 16:11:44 +01:00
parent a9970bec5b
commit 23268f6557
1 changed files with 3 additions and 2 deletions

View File

@ -1,9 +1,10 @@
import smtplib
from email.mime.multipart import MIMEMultipart
from email.mime.text import MIMEText
from email.mime.multipart import MIMEMultipart
from flaschengeist import logger
from flaschengeist.models.user import User
from flaschengeist.utils.hook import HookAfter
from flaschengeist.controller import userController
from flaschengeist.controller.messageController import Message
@ -20,7 +21,7 @@ class MailMessagePlugin(Plugin):
self.crypt = config["CRYPT"]
self.mail = config["MAIL"]
# @send_message_hook
@HookAfter("send_message")
def dummy_send(msg):
self.send_mail(msg)