From 053773201ccad806859ad3d19405ad7321989616 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Florent=20Thi=C3=A9ry?= <florent.thiery@ubicast.eu>
Date: Fri, 17 Mar 2017 11:20:34 +0100
Subject: [PATCH] improve mail title by adding the ms name

---
 tester.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/tester.py b/tester.py
index 40e0eff9..484436b5 100755
--- a/tester.py
+++ b/tester.py
@@ -343,13 +343,14 @@ class Tester():
                     log('Too many consecutive tester failures: %s, no email will be sent.' % consecutive_failures)
         if send_email:
             recipients = utils.get_conf('EMAIL_ADMINS')
+            mediaserver_name = utils.get_conf('MS_SERVER_NAME')
             if not recipients:
                 log('No recipients defined for email sending. Set a value for EMAIL_ADMINS.')
                 return 1
             boundary = str(uuid.uuid4())
             mail = '''From: %(hostname)s <noreply@ubicast.eu>
 To: %(recipients)s
-Subject: %(hostname)s UbiCast MediaServer functional tests report: %(status)s
+Subject: %(mediaserver_name)s (%(hostname)s) MediaServer health report: %(status)s
 Mime-Version: 1.0
 Content-type: multipart/related; boundary="%(boundary)s"
 
@@ -374,6 +375,7 @@ Content-transfer-encoding: utf-8
                 report=html_report,
                 log_name=log_name,
                 log_content=log_content,
+                mediaserver_name=mediaserver_name,
             )
             p = subprocess.Popen(['sendmail', '-t'], stdin=subprocess.PIPE, stdout=sys.stdout.stream, stderr=sys.stderr.stream)
             p.communicate(input=mail.encode('utf-8'))
-- 
GitLab