From 41c794d1b1bcc82570d9ceea5b9b0ec701384251 Mon Sep 17 00:00:00 2001 From: Marc Schubert Date: Wed, 20 Sep 2023 17:20:34 +0200 Subject: [PATCH] repair receiver address --- src/notify.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/notify.py b/src/notify.py index 53f9c32e4..7a6967416 100644 --- a/src/notify.py +++ b/src/notify.py @@ -36,7 +36,7 @@ def send(config, last_send=None, dry_run=False): else: smtp.login(email, password) - msg = build_message(email) + msg = build_message(email, to_email) smtp.sendmail(from_addr=email, to_addrs=to_email, msg=msg.as_string()) smtp.quit() @@ -49,9 +49,9 @@ def send(config, last_send=None, dry_run=False): return sent_on -def build_message(email): +def build_message(email, to_email): """Create email message.""" - message = Message(to=email) + message = Message(to=to_email) message.sender = "icloud-docker <" + email + ">" message.date = datetime.datetime.now().strftime("%d/%m/%Y %H:%M") message.subject = "icloud-docker: Two step authentication required"