From a2232ef7dce4a548412651170402172fac5551b9 Mon Sep 17 00:00:00 2001 From: TheWanderingCrow Date: Mon, 22 Dec 2025 10:11:59 -0500 Subject: [PATCH] fix: Uncomment the budget sync functionality, handle recipients string properly --- main.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/main.go b/main.go index a0bfcbb..195a22a 100644 --- a/main.go +++ b/main.go @@ -144,9 +144,9 @@ func main() { var smtpHost = os.Getenv("SMTP_HOST") var smtpRecipients = os.Getenv("SMTP_RECIPIENTS") client := CreateBudgetClient(baseUrl, apiKey, syncId) - //if !client.BankSync() { - // log.Println("Bank Sync failed, information may not be up to date") - //} + if !client.BankSync() { + log.Println("Bank Sync failed, information may not be up to date") + } budgetMonths := client.GetBudgetMonths() subject := "Subject: Budget Report\n" @@ -182,7 +182,7 @@ func main() { } else { auth = smtp.PlainAuth("", smtpUsername, smtpPassword, smtpHost) } - err := smtp.SendMail(smtpHost, auth, smtpUsername, []string{smtpRecipients}, []byte(message)) + err := smtp.SendMail(smtpHost, auth, smtpUsername, strings.Split(smtpRecipients, ","), []byte(message)) if err != nil { log.Fatal(err) }