Add date header & message id
This commit is contained in:
parent
80be396464
commit
9ef05a12c3
|
@ -20,6 +20,7 @@ from synapse.server import HomeServer
|
||||||
from synapse.config._base import ConfigError
|
from synapse.config._base import ConfigError
|
||||||
from synapse.config.database import DatabaseConfig
|
from synapse.config.database import DatabaseConfig
|
||||||
from synapse.config.logger import LoggingConfig
|
from synapse.config.logger import LoggingConfig
|
||||||
|
from synapse.config.emailconfig import EmailConfig
|
||||||
from synapse.http.site import SynapseSite
|
from synapse.http.site import SynapseSite
|
||||||
from synapse.metrics.resource import MetricsResource, METRICS_PREFIX
|
from synapse.metrics.resource import MetricsResource, METRICS_PREFIX
|
||||||
from synapse.replication.slave.storage.events import SlavedEventStore
|
from synapse.replication.slave.storage.events import SlavedEventStore
|
||||||
|
@ -91,7 +92,7 @@ class SlaveConfig(DatabaseConfig):
|
||||||
""" % locals()
|
""" % locals()
|
||||||
|
|
||||||
|
|
||||||
class PusherSlaveConfig(SlaveConfig, LoggingConfig):
|
class PusherSlaveConfig(SlaveConfig, LoggingConfig, EmailConfig):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -152,6 +152,8 @@ class Mailer(object):
|
||||||
multipart_msg['Subject'] = "New Matrix Notifications"
|
multipart_msg['Subject'] = "New Matrix Notifications"
|
||||||
multipart_msg['From'] = self.hs.config.email_notif_from
|
multipart_msg['From'] = self.hs.config.email_notif_from
|
||||||
multipart_msg['To'] = email_address
|
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(text_part)
|
||||||
multipart_msg.attach(html_part)
|
multipart_msg.attach(html_part)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue