From 7bb0f1f6bb858767e4f17aa699952544fcc28b1c Mon Sep 17 00:00:00 2001 From: Jeffrey Serio Date: Sat, 7 Sep 2024 15:39:46 -0500 Subject: [PATCH] Add resend_borg_error.py --- resend_borg_error.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100755 resend_borg_error.py diff --git a/resend_borg_error.py b/resend_borg_error.py new file mode 100755 index 0000000..30a3b36 --- /dev/null +++ b/resend_borg_error.py @@ -0,0 +1,16 @@ +#!/usr/bin/env python3 + +import os +import resend + +resend.api_key = os.environ["RESEND_API_KEY"] + +params: resend.Emails.SendParams = { + "from": "Borgmatic ", + "to": ["hyperreal@fedoraproject.org"], + "subject": "Error running Borgmatic", + "html": "There was an error running your Borgmatic backup. Please investigate.", +} + +email = resend.Emails.send(params) +print(email)