aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--widgets/compose.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/widgets/compose.go b/widgets/compose.go
index 8830d9d6..6a342d41 100644
--- a/widgets/compose.go
+++ b/widgets/compose.go
@@ -952,6 +952,10 @@ func (he *headerEditor) storeValue() {
val := he.input.String()
switch strings.ToLower(he.name) {
case "to", "from", "cc", "bcc":
+ if strings.TrimSpace(val) == "" {
+ // Don't set empty address list headers
+ return
+ }
list, err := mail.ParseAddressList(val)
if err == nil {
he.header.SetAddressList(he.name, list)