https://github.com/davidvujic/clojure-email-experiment
Experimenting with parsing email files using Clojure
https://github.com/davidvujic/clojure-email-experiment
clojure email parsing
Last synced: 3 days ago
JSON representation
Experimenting with parsing email files using Clojure
- Host: GitHub
- URL: https://github.com/davidvujic/clojure-email-experiment
- Owner: DavidVujic
- Created: 2021-01-22T07:03:16.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2021-02-05T10:32:30.000Z (over 5 years ago)
- Last Synced: 2025-10-19T02:56:37.385Z (9 months ago)
- Topics: clojure, email, parsing
- Language: Clojure
- Homepage:
- Size: 8.79 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
### clojure-email-experiment
This repo has evolved into a `Clojure` library downloadable at `Clojars` and is now maintained in a different repo:
https://github.com/DavidVujic/email-attachments
Experimenting with parsing an email file using Clojure.
#### Usage
Example, extract an attached CSV file from an email and extract the content as a stream:
``` clojure
(->> "my_email_file.eml"
io/input-stream
email/content-types
(filter email/csv?)
first
email/content-stream)
```
#### References
Got a lot of inspiration and ideas from these repositories:
* [clojure-mail](https://github.com/owainlewis/clojure-mail)
* [simple-email](https://github.com/kisom/simple-email)
Useful Java docs:
* https://docs.oracle.com/javaee/6/api/javax/mail/internet/MimeMessage.html
* https://commons.apache.org/proper/commons-email/apidocs/org/apache/commons/mail/util/MimeMessageParser.html