Add TNEF handling and email loading improvements

- Implement TNEF extraction and recursive parsing in new `tnef_reader.go` and associated tests.
- Create tests for TNEF extraction scenarios in `tnef_diag_test.go`, `tnef_diag7_test.go`, and `tnef_diag8_test.go`.
This commit is contained in:
Flavio Fois
2026-02-14 09:03:41 +01:00
parent 33cb171fb1
commit 54a3dff1c2
23 changed files with 2029 additions and 18 deletions

View File

@@ -146,6 +146,9 @@ func ReadEmlFile(filePath string) (*EmailData, error) {
})
}
// Expand any TNEF (winmail.dat) attachments into their contained files.
attachments = expandTNEFAttachments(attachments)
isPec := hasDatiCert && hasSmime
// Format From
@@ -267,6 +270,9 @@ func ReadPecInnerEml(filePath string) (*EmailData, error) {
})
}
// Expand any TNEF (winmail.dat) attachments into their contained files.
attachments = expandTNEFAttachments(attachments)
isPec := hasDatiCert && hasSmime
// Format From