diff --git a/picomon/mails.py b/picomon/mails.py index 898b24eece84d58036889793a22ead237558b09a..eaf460f793fd649eea206b9fa2e8a0a5d2ef8f66 100644 --- a/picomon/mails.py +++ b/picomon/mails.py @@ -135,7 +135,7 @@ def send_email_for_check(check, removed=False): extra_headers = {} extra_headers['Message-ID'] = make_msgid(type(check).__name__) # if it's a follow up, set In-Reply-To - if hasattr(check, 'mails_msgid'): + if (check.ok or removed) and hasattr(check, 'mails_msgid'): extra_headers['In-Reply-To'] = check.mails_msgid extra_headers['References'] = check.mails_msgid check.mails_msgid = extra_headers['Message-ID']