From 676fed9e2265a40f81cb9f2a083809ff7bf32772 Mon Sep 17 00:00:00 2001 From: Andrew Jeffery Date: Thu, 12 Nov 2020 21:58:02 +0000 Subject: [PATCH] Check account's from value is not empty This leads to a nasty 'mail: no address' message for each email if left empty so the user really should enter it. --- config/config.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/config/config.go b/config/config.go index bb83579..87d183a 100644 --- a/config/config.go +++ b/config/config.go @@ -216,6 +216,9 @@ func loadAccountConfig(path string) ([]AccountConfig, error) { if account.Source == "" { return nil, fmt.Errorf("Expected source for account %s", _sec) } + if account.From == "" { + return nil, fmt.Errorf("Expected from for account %s", _sec) + } source, err := parseCredential(account.Source, account.SourceCredCmd) if err != nil {