Add date header & message id

This commit is contained in:
David Baker 2016-05-04 14:52:10 +01:00
parent 80be396464
commit 9ef05a12c3
2 changed files with 4 additions and 1 deletions

View file

@ -20,6 +20,7 @@ from synapse.server import HomeServer
from synapse.config._base import ConfigError
from synapse.config.database import DatabaseConfig
from synapse.config.logger import LoggingConfig
from synapse.config.emailconfig import EmailConfig
from synapse.http.site import SynapseSite
from synapse.metrics.resource import MetricsResource, METRICS_PREFIX
from synapse.replication.slave.storage.events import SlavedEventStore
@ -91,7 +92,7 @@ class SlaveConfig(DatabaseConfig):
""" % locals()
class PusherSlaveConfig(SlaveConfig, LoggingConfig):
class PusherSlaveConfig(SlaveConfig, LoggingConfig, EmailConfig):
pass

View file

@ -152,6 +152,8 @@ class Mailer(object):
multipart_msg['Subject'] = "New Matrix Notifications"
multipart_msg['From'] = self.hs.config.email_notif_from
multipart_msg['To'] = email_address
multipart_msg['Date'] = email.utils.formatdate()
multipart_msg['Message-ID'] = email.utils.make_msgid()
multipart_msg.attach(text_part)
multipart_msg.attach(html_part)