We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
It would be nice to write message text to files. Same as in this patch.
index 2313bc4..974e0ec 100644 --- a/cmd/mime-extractor/mime-extractor.go +++ b/cmd/mime-extractor/mime-extractor.go @@ -81,6 +81,29 @@ func (ex *extractor) extract(file, dir string) int { // Write errOut attachments fmt.Fprintf(ex.errOut, "\nExtracting attachments into %s...", dir) + + // Write Subject + newFileName := filepath.Join(dir, ".subject") + err = ex.fileWrite(newFileName, []byte(e.GetHeader("Subject")), 0644) + if err != nil { + fmt.Fprintf(ex.stdOut, "Error writing file %q: %v\n", newFileName, err) + } + + // Write TEXT + newFileName = filepath.Join(dir, ".text") + err = ex.fileWrite(newFileName, []byte(e.Text), 0644) + if err != nil { + fmt.Fprintf(ex.stdOut, "Error writing file %q: %v\n", newFileName, err) + } + + // Write HTML + newFileName = filepath.Join(dir, ".html") + err = ex.fileWrite(newFileName, []byte(e.HTML), 0644) + if err != nil { + fmt.Fprintf(ex.stdOut, "Error writing file %q: %v\n", newFileName, err) + } + + // Write attachments for _, a := range e.Attachments { newFileName := filepath.Join(dir, a.FileName) err = ex.fileWrite(newFileName, a.Content, 0644)
I use this patch. May be other users need something the same...
The text was updated successfully, but these errors were encountered:
No branches or pull requests
It would be nice to write message text to files. Same as in this patch.
I use this patch. May be other users need something the same...
The text was updated successfully, but these errors were encountered: