diff options
Diffstat (limited to 'widgets/msgviewer.go')
-rw-r--r-- | widgets/msgviewer.go | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/widgets/msgviewer.go b/widgets/msgviewer.go index d168f456..4006e25b 100644 --- a/widgets/msgviewer.go +++ b/widgets/msgviewer.go @@ -595,6 +595,14 @@ func NewPartViewer(acct *AccountView, conf *config.AercConfig, fmt.Sprintf("AERC_MIME_TYPE=%s", mime)) filter.Env = append(filter.Env, fmt.Sprintf("AERC_FILENAME=%s", part.FileName())) + if flowed, ok := part.Params["format"]; ok { + filter.Env = append(filter.Env, + fmt.Sprintf("AERC_FORMAT=%s", flowed)) + } + filter.Env = append(filter.Env, + fmt.Sprintf("AERC_SUBJECT=%s", info.Envelope.Subject)) + filter.Env = append(filter.Env, fmt.Sprintf("AERC_FROM=%s", + format.FormatAddresses(info.Envelope.From))) if pagerin, err = pager.StdinPipe(); err != nil { return nil, err } |