From 13389fa2dbd1ef6fca3b83740c42497482b6261a Mon Sep 17 00:00:00 2001 From: Asaf Gartner Date: Wed, 13 Sep 2023 00:56:00 +0300 Subject: [PATCH] Added some printing while sending so you can tell it's not stuck --- main.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/main.go b/main.go index 5d8db16..cbf98a6 100644 --- a/main.go +++ b/main.go @@ -273,6 +273,7 @@ type PostmarkBatchResult struct { } func sendMail(cfg Config, recipients []string, subject, contentHtml string) ([]PostmarkBatchResult, error) { + fmt.Printf("Sending batch [%d recipients]...", len(recipients)) from := cfg.FromAddress if cfg.FromName != "" { from = fmt.Sprintf("%s <%s>", cfg.FromName, cfg.FromAddress) @@ -322,6 +323,7 @@ func sendMail(cfg Config, recipients []string, subject, contentHtml string) ([]P fmt.Printf("Batch sent successfully, but failed to parse response from postmark.\n") return nil, nil } + fmt.Printf("Done.\n") return results, nil }