An open API service providing package, version and dependency metadata of many open source software ecosystems and registries.

github.com/rorycl/letters

This is a fork of mnako/letters(https://github.com/mnako/letters), a minimalistic Golang library for parsing plaintext and MIME emails. Thanks to @mnako and contributors, letters has great support for languages other than English, text encodings and transfer-encodings. This fork focuses on performance, memory efficiency and extensibility through modularisation. ## Quickstart ``` go get github.com/rorycl/letters@latest ``` Parse an email: Various options are provided for customising the Parser, including: The `WithoutAttachments` and `WithHeadersOnly` options determine if only part of an email will be processed. The `WithSkipContentTypes` allows the user to skip processing MIME message parts with the supplied content-types. The date and address "With" options allow the provision of custom funcs to override the net/mail funcs normally used. For example it might be necessary to extend the date parsing capabilities to deal with poorly formatted date strings produced by older SMTP servers. The `WithCustomFileFunc` allows the provision of a custom func for saving, filtering and/or processing of inline or attached files without reading them first into an `email.File.Data` []byte slice first, which is the default behaviour. The `WithSaveFilesToDirectory` option is an example of such a custom func. As shown in the parser/optspkg_test.go(parser/optspkg_test.go) package test, `WithCustomFileFunc` can be used to, for example, only process `image/jpeg` files. More examples are shown in parser/opts_test.go(parser/opts_test.go), for example:

Ecosystem
proxy.golang.org
Latest Release
v0.1.3
10 months ago
Versions
5
Links
Registry proxy.golang.org
Source Repository
Docs Documentation
JSON API View JSON
CodeMeta codemeta.json
Package Details
PURL pkg:golang/github.com/rorycl/letters
spec
License MIT
Namespace github.com/rorycl
First Release about 1 year ago
Last Synced 2 days ago
Repository
Stars 0 on GitHub
Forks 0 on GitHub
Rankings on proxy.golang.org
Overall Top 6.1%