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.
This commit is contained in:
parent
a9ae91c2d8
commit
676fed9e22
1 changed files with 3 additions and 0 deletions
|
@ -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 {
|
||||
|
|
Loading…
Reference in a new issue