Commits

danjac  committed ddde524

added message dispatched event

  • Participants
  • Parent commits 0874a4c

Comments (0)

Files changed (1)

File pyramid_lamson/connection.py

 import socket
 
 from pyramid_lamson.mail.message import Message
-from pyramid_lamson.mail.signals import email_dispatched
+from pyramid_lamson.mail.events import MessageDispatched
 
 class Connection(object):
 
                                message.send_to,
                                str(message.get_response()))
 
-        if email_dispatched:
-            email_dispatched.send(message, app=self.app)
+        self.mailer.config.registry.notify(MessageDispatched(message))
 
         self.num_emails += 1