aboutsummaryrefslogtreecommitdiffstats
path: root/commands/msg/reply.go
diff options
context:
space:
mode:
Diffstat (limited to 'commands/msg/reply.go')
-rw-r--r--commands/msg/reply.go16
1 files changed, 3 insertions, 13 deletions
diff --git a/commands/msg/reply.go b/commands/msg/reply.go
index 52265950..795158ca 100644
--- a/commands/msg/reply.go
+++ b/commands/msg/reply.go
@@ -71,17 +71,7 @@ func (reply) Execute(aerc *widgets.Aerc, args []string) error {
return errors.New("No account selected")
}
conf := acct.AccountConfig()
- from, err := mail.ParseAddress(conf.From)
- if err != nil {
- return err
- }
- var aliases []*mail.Address
- if conf.Aliases != "" {
- aliases, err = mail.ParseAddressList(conf.Aliases)
- if err != nil {
- return err
- }
- }
+ from := conf.From
store := widget.Store()
if store == nil {
@@ -93,7 +83,7 @@ func (reply) Execute(aerc *widgets.Aerc, args []string) error {
}
// figure out the sending from address if we have aliases
- if len(aliases) != 0 {
+ if len(conf.Aliases) != 0 {
rec := newAddrSet()
rec.AddList(msg.Envelope.To)
rec.AddList(msg.Envelope.Cc)
@@ -101,7 +91,7 @@ func (reply) Execute(aerc *widgets.Aerc, args []string) error {
if rec.Contains(from) {
// do nothing
} else {
- for _, a := range aliases {
+ for _, a := range conf.Aliases {
if rec.Contains(a) {
from = a
break