From f18db202f95bd53062f9b6ace6965a1bd5ca41fd Mon Sep 17 00:00:00 2001 From: Maas Lalani Date: Tue, 26 Sep 2023 15:53:51 -0400 Subject: [PATCH] fix: `--from` should take priority over `--smtp.user` if set --- main.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/main.go b/main.go index 0ddb676..2d60752 100644 --- a/main.go +++ b/main.go @@ -82,7 +82,9 @@ var rootCmd = &cobra.Command{ deliveryMethod = Resend case smtpUsername != "" && smtpPassword != "": deliveryMethod = SMTP - from = smtpUsername + if from == "" { + from = smtpUsername + } } switch deliveryMethod {