Conditions | 1 |
Total Lines | 13 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Tests | 1 |
CRAP Score | 1.2963 |
Changes | 0 |
1 | #!/usr/bin/python |
||
41 | 1 | def send_message(self, subject: str, text: str) -> None: |
|
42 | """Send a mail to the configured mail |
||
43 | |||
44 | :type subject: |
||
45 | :type text: |
||
46 | :return: |
||
47 | """ |
||
48 | text = '\r\n'.join(['To: %s' % Settings.Notification.Mail.recipient_mail, |
||
49 | 'From: %s' % Settings.Notification.Mail.sender_mail, |
||
50 | 'Subject: %s' % subject, |
||
51 | '', text]) |
||
52 | |||
53 | self._smtp.sendmail(Settings.Notification.Mail.sender_mail, Settings.Notification.Mail.recipient_mail, text) |
||
54 |