[AUH,1/2] emailhandler: actually send messages to cc_list as well

Submitted by Alexander Kanavin on June 30, 2020, 9:09 a.m. | Patch ID: 174088

Details

Message ID 20200630090911.8813-1-alex.kanavin@gmail.com
State New
Headers show

Commit Message

Alexander Kanavin June 30, 2020, 9:09 a.m.
Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
---
 modules/utils/emailhandler.py | 2 ++
 1 file changed, 2 insertions(+)

Patch hide | download patch | download mbox

diff --git a/modules/utils/emailhandler.py b/modules/utils/emailhandler.py
index 066f013..8c8b85b 100644
--- a/modules/utils/emailhandler.py
+++ b/modules/utils/emailhandler.py
@@ -103,6 +103,8 @@  class Email(object):
         try:
             smtp = SMTP(self.smtp_host, self.smtp_port)
             smtp.sendmail(self.from_addr, to_addr, msg_text)
+            if cc_addr is not None:
+                smtp.sendmail(self.from_addr, cc_addr, msg_text)
             smtp.close()
         except Exception as e:
             E("Could not send email: %s" % str(e))