diff options
author | Andrew Jeffery <dev@jeffas.io> | 2020-11-12 21:58:02 +0000 |
---|---|---|
committer | Reto Brunner <reto@labrat.space> | 2020-11-13 22:01:34 +0100 |
commit | 676fed9e2265a40f81cb9f2a083809ff7bf32772 (patch) | |
tree | 9308f64daef7697fe385e74079918f9f6ac47fb8 /config/config.go | |
parent | a9ae91c2d8d106ec85650fc0534c9cdffa8541eb (diff) | |
download | aerc-676fed9e2265a40f81cb9f2a083809ff7bf32772.tar.gz |
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.
Diffstat (limited to 'config/config.go')
-rw-r--r-- | config/config.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/config/config.go b/config/config.go index bb83579c..87d183a4 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 { |