summary refs log tree commit diff stats
path: root/commands
diff options
context:
space:
mode:
Diffstat (limited to 'commands')
-rw-r--r--commands/compose/send.go3
-rw-r--r--commands/msg/reply.go11
2 files changed, 8 insertions, 6 deletions
diff --git a/commands/compose/send.go b/commands/compose/send.go
index 70446da..e7ef509 100644
--- a/commands/compose/send.go
+++ b/commands/compose/send.go
@@ -16,7 +16,6 @@ import (
 	"github.com/pkg/errors"
 
 	"git.sr.ht/~sircmpwn/aerc/lib"
-	"git.sr.ht/~sircmpwn/aerc/lib/format"
 	"git.sr.ht/~sircmpwn/aerc/models"
 	"git.sr.ht/~sircmpwn/aerc/widgets"
 	"git.sr.ht/~sircmpwn/aerc/worker/types"
@@ -84,7 +83,7 @@ func (Send) Execute(aerc *widgets.Aerc, args []string) error {
 	if config.From == "" {
 		return errors.New("No 'From' configured for this account")
 	}
-	from, err := format.ParseAddress(config.From)
+	from, err := mail.ParseAddress(config.From)
 	if err != nil {
 		return errors.Wrap(err, "ParseAddress(config.From)")
 	}
diff --git a/commands/msg/reply.go b/commands/msg/reply.go
index 863c7d2..fcd8341 100644
--- a/commands/msg/reply.go
+++ b/commands/msg/reply.go
@@ -61,13 +61,16 @@ func (reply) Execute(aerc *widgets.Aerc, args []string) error {
 		return errors.New("No account selected")
 	}
 	conf := acct.AccountConfig()
-	from, err := format.ParseAddress(conf.From)
+	from, err := mail.ParseAddress(conf.From)
 	if err != nil {
 		return err
 	}
-	aliases, err := format.ParseAddressList(conf.Aliases)
-	if err != nil {
-		return err
+	var aliases []*mail.Address
+	if conf.Aliases != "" {
+		aliases, err = mail.ParseAddressList(conf.Aliases)
+		if err != nil {
+			return err
+		}
 	}
 
 	store := widget.Store()