Initialize GmailNotifier class Args: username (str): Username of the gmail account to use for sending message. password (str): Password of the gmail account to use for sending message. destination_addresses (list): A list of email addresses to notify.
(self, username, password, destination_addresses)
| 13 | """ |
| 14 | |
| 15 | def __init__(self, username, password, destination_addresses): |
| 16 | """Initialize GmailNotifier class |
| 17 | |
| 18 | Args: |
| 19 | username (str): Username of the gmail account to use for sending message. |
| 20 | password (str): Password of the gmail account to use for sending message. |
| 21 | destination_addresses (list): A list of email addresses to notify. |
| 22 | """ |
| 23 | |
| 24 | self.logger = structlog.get_logger() |
| 25 | self.smtp_server = 'smtp.gmail.com:587' |
| 26 | self.username = username |
| 27 | self.password = password |
| 28 | self.destination_addresses = ','.join(destination_addresses) |
| 29 | |
| 30 | |
| 31 | @retry(stop=stop_after_attempt(3)) |
nothing calls this directly
no outgoing calls
no test coverage detected