Add inline attachments to comments
If incoming email is configured and an email is sent, inline attachments are currently not added to the comment if it has the `Content-Disposition: inline` instead of `Content-Disposition: attachment` as e.g. with Apple Mail. This adds inline attachments (`Content-Disposition: inline`) that have a filename as attachment to the comment. Fixes #3496
This commit is contained in:
parent
bfdbc2371d
commit
162b840100
|
@ -367,6 +367,14 @@ func getContentFromMailReader(env *enmime.Envelope) *MailContent {
|
|||
Content: attachment.Content,
|
||||
})
|
||||
}
|
||||
for _, inline := range env.Inlines {
|
||||
if inline.FileName != "" {
|
||||
attachments = append(attachments, &Attachment{
|
||||
Name: inline.FileName,
|
||||
Content: inline.Content,
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
return &MailContent{
|
||||
Content: reply.FromText(env.Text),
|
||||
|
|
Loading…
Reference in a new issue