Fixed hook for mail sending
This commit is contained in:
parent
a9970bec5b
commit
23268f6557
|
@ -1,9 +1,10 @@
|
||||||
import smtplib
|
import smtplib
|
||||||
from email.mime.multipart import MIMEMultipart
|
|
||||||
from email.mime.text import MIMEText
|
from email.mime.text import MIMEText
|
||||||
|
from email.mime.multipart import MIMEMultipart
|
||||||
|
|
||||||
from flaschengeist import logger
|
from flaschengeist import logger
|
||||||
from flaschengeist.models.user import User
|
from flaschengeist.models.user import User
|
||||||
|
from flaschengeist.utils.hook import HookAfter
|
||||||
from flaschengeist.controller import userController
|
from flaschengeist.controller import userController
|
||||||
from flaschengeist.controller.messageController import Message
|
from flaschengeist.controller.messageController import Message
|
||||||
|
|
||||||
|
@ -20,7 +21,7 @@ class MailMessagePlugin(Plugin):
|
||||||
self.crypt = config["CRYPT"]
|
self.crypt = config["CRYPT"]
|
||||||
self.mail = config["MAIL"]
|
self.mail = config["MAIL"]
|
||||||
|
|
||||||
# @send_message_hook
|
@HookAfter("send_message")
|
||||||
def dummy_send(msg):
|
def dummy_send(msg):
|
||||||
self.send_mail(msg)
|
self.send_mail(msg)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue