.seek(0) on the message before passing stdin to the markup process

This commit is contained in:
Fabio Manganiello 2022-11-07 02:01:21 +01:00
parent 5df1ebce35
commit 49bdace2f6

View file

@ -541,6 +541,12 @@ func (c *Composer) GenerateMarkup(markupKey string) error {
} }
go func() { go func() {
defer stdin.Close() defer stdin.Close()
_, err := c.email.Seek(0, io.SeekStart)
if err != nil {
logging.Warnf("failed to seek beginning of mail: %v", err)
return
}
io.Copy(stdin, c.email) io.Copy(stdin, c.email)
}() }()
outBytes, err := proc.Output() outBytes, err := proc.Output()