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
|
@ -216,6 +216,9 @@ func loadAccountConfig(path string) ([]AccountConfig, error) {
|
||||||
if account.Source == "" {
|
if account.Source == "" {
|
||||||
return nil, fmt.Errorf("Expected source for account %s", _sec)
|
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)
|
source, err := parseCredential(account.Source, account.SourceCredCmd)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
Loading…
Reference in New Issue