diff --git a/cyhy/mailer/CyhyMessage.py b/cyhy/mailer/CyhyMessage.py index b01d68c..643ef65 100644 --- a/cyhy/mailer/CyhyMessage.py +++ b/cyhy/mailer/CyhyMessage.py @@ -29,7 +29,7 @@ class CyhyMessage(ReportMessage): Subject = "{{acronym}} - Cyber Hygiene Report - {{report_date}} Results" - TextBody = """Greetings {{acronym}}, + TextBody = """Greetings {{name}} ({{acronym}}), The Cyber Hygiene scan results are attached for your review. Same password as before. (If this is your first report and you have yet to receive a password, please let us know.) @@ -57,7 +57,7 @@ class CyhyMessage(ReportMessage): HtmlBody = """ -

Greetings {{acronym}},

+

Greetings {{name}} ({{acronym}}),

The Cyber Hygiene scan results are attached for your review. Same password as before. (If this is your first report and you have yet to receive a password, please let us know.)

@@ -91,6 +91,7 @@ def __init__( to_addrs, pdf_filename, entity_acronym, + entity_name, report_date, tech_pocs, from_addr=Message.DefaultFrom, @@ -113,6 +114,10 @@ def __init__( The acronym used by the entity corresponding to the CYHY report attachment. + entity_name : str + The name of the entity corresponding to the CYHY report + attachment. + report_date : str The date corresponding to the CYHY report attachment. We have been using dates of the form December 12, 2017. @@ -140,8 +145,9 @@ def __init__( # This is the data mustache will use to render the templates mustache_data = { "acronym": entity_acronym, - "report_date": report_date, "has_tech_pocs": len(tech_pocs) != 0, + "name": entity_name, + "report_date": report_date, "tech_pocs": tech_pocs, } diff --git a/cyhy/mailer/CyhyNotificationMessage.py b/cyhy/mailer/CyhyNotificationMessage.py index 63d37d9..2323233 100644 --- a/cyhy/mailer/CyhyNotificationMessage.py +++ b/cyhy/mailer/CyhyNotificationMessage.py @@ -29,7 +29,7 @@ class CyhyNotificationMessage(ReportMessage): Subject = "{{acronym}} - Cyber Hygiene Alert - {{report_date}}" - TextBody = """Greetings {{acronym}}, + TextBody = """Greetings {{name}} ({{acronym}}), Cyber Hygiene scans of your host(s) conducted in the past day have detected one or more of the following: * New critical, high, and/or known exploited vulnerabilities @@ -58,7 +58,7 @@ class CyhyNotificationMessage(ReportMessage): HtmlBody = """ -

Greetings {{acronym}},

+

Greetings {{name}} ({{acronym}}),

Cyber Hygiene scans of your host(s) conducted in the past day have detected one or more of the following: