mirror of
https://github.com/ProtonMail/proton-bridge.git
synced 2025-12-17 23:56:56 +00:00
feat: recreate message with parser's writer
This commit is contained in:
@ -67,13 +67,7 @@ func (im *imapMailbox) CreateMessage(flags []string, date time.Time, body imap.L
|
||||
// Called from go-imap in goroutines - we need to handle panics for each function.
|
||||
defer im.panicHandler.HandlePanic()
|
||||
|
||||
buf := new(bytes.Buffer)
|
||||
|
||||
if _, err := buf.ReadFrom(body); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
m, _, readers, err := message.Parse(buf.Bytes(), "", "")
|
||||
m, _, _, readers, err := message.Parse(body, "", "")
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user