From bda74452a81963d20c099a1252caadde7049de10 Mon Sep 17 00:00:00 2001 From: Drew DeVault Date: Sun, 12 May 2019 23:35:36 -0400 Subject: [PATCH] Add outgoing account configuration --- config/accounts.conf | 2 ++ config/config.go | 13 ++++++++----- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/config/accounts.conf b/config/accounts.conf index a25c64e..03846db 100644 --- a/config/accounts.conf +++ b/config/accounts.conf @@ -7,9 +7,11 @@ # # [Personal] # source=imaps://username[:password]@hostname[:port] +# outgoing=smtps+plain://username[:password]@hostname[:port] # # [Work] # source=imaps://username[:password]@hostname[:port] +# outgoing=/usr/bin/sendmail # folders=INBOX,Sent,Archives # default=Archives # diff --git a/config/config.go b/config/config.go index a63b7e8..88986e3 100644 --- a/config/config.go +++ b/config/config.go @@ -29,11 +29,12 @@ const ( ) type AccountConfig struct { - Default string - Name string - Source string - Folders []string - Params map[string]string + Default string + Name string + Source string + Folders []string + Params map[string]string + Outgoing string } type BindingConfig struct { @@ -105,6 +106,8 @@ func loadAccountConfig(path string) ([]AccountConfig, error) { for key, val := range sec.KeysHash() { if key == "folders" { account.Folders = strings.Split(val, ",") + } else if key == "outgoing" { + account.Outgoing = val } else if key != "name" { account.Params[key] = val }