Add outgoing account configuration
This commit is contained in:
parent
f37508a539
commit
bda74452a8
2 changed files with 10 additions and 5 deletions
|
@ -7,9 +7,11 @@
|
||||||
#
|
#
|
||||||
# [Personal]
|
# [Personal]
|
||||||
# source=imaps://username[:password]@hostname[:port]
|
# source=imaps://username[:password]@hostname[:port]
|
||||||
|
# outgoing=smtps+plain://username[:password]@hostname[:port]
|
||||||
#
|
#
|
||||||
# [Work]
|
# [Work]
|
||||||
# source=imaps://username[:password]@hostname[:port]
|
# source=imaps://username[:password]@hostname[:port]
|
||||||
|
# outgoing=/usr/bin/sendmail
|
||||||
# folders=INBOX,Sent,Archives
|
# folders=INBOX,Sent,Archives
|
||||||
# default=Archives
|
# default=Archives
|
||||||
#
|
#
|
||||||
|
|
|
@ -34,6 +34,7 @@ type AccountConfig struct {
|
||||||
Source string
|
Source string
|
||||||
Folders []string
|
Folders []string
|
||||||
Params map[string]string
|
Params map[string]string
|
||||||
|
Outgoing string
|
||||||
}
|
}
|
||||||
|
|
||||||
type BindingConfig struct {
|
type BindingConfig struct {
|
||||||
|
@ -105,6 +106,8 @@ func loadAccountConfig(path string) ([]AccountConfig, error) {
|
||||||
for key, val := range sec.KeysHash() {
|
for key, val := range sec.KeysHash() {
|
||||||
if key == "folders" {
|
if key == "folders" {
|
||||||
account.Folders = strings.Split(val, ",")
|
account.Folders = strings.Split(val, ",")
|
||||||
|
} else if key == "outgoing" {
|
||||||
|
account.Outgoing = val
|
||||||
} else if key != "name" {
|
} else if key != "name" {
|
||||||
account.Params[key] = val
|
account.Params[key] = val
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue