[hotfix] stop frappe sending automatic responses from non user generated emails (#2674)
This commit is contained in:
parent
3848c657ca
commit
268e7ad644
2 changed files with 7 additions and 0 deletions
|
|
@ -361,6 +361,12 @@ class EmailAccount(Document):
|
|||
communication.reference_doctype = parent.doctype
|
||||
communication.reference_name = parent.name
|
||||
|
||||
# check if message is notification and disable notifications for this message
|
||||
isnotification = email.mail.get("isnotification")
|
||||
if isnotification:
|
||||
if "notification" in isnotification:
|
||||
communication.unread_notification_sent = 1
|
||||
|
||||
def set_sender_field_and_subject_field(self):
|
||||
'''Identify the sender and subject fields from the `append_to` DocType'''
|
||||
# set subject_field and sender_field
|
||||
|
|
|
|||
|
|
@ -188,6 +188,7 @@ class EMail:
|
|||
self.msg_root["Message-Id"] = '<' + message_id + '>'
|
||||
else:
|
||||
self.msg_root["Message-Id"] = get_message_id()
|
||||
self.msg_root["isnotification"] = '<notification>'
|
||||
|
||||
def set_in_reply_to(self, in_reply_to):
|
||||
"""Used to send the Message-Id of a received email back as In-Reply-To"""
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue