mail-parser v1.2.0
fedelemantuano
released this
11 Jul 08:38
·
436 commits
to develop
since this release
Highlights
- Added three functions to module
mailparser
: parse_from_file
: parsing mail from a fileparse_from_string
: parsing mail from a stringparse_from_bytes
: parsing mail from bytes, new function only for Python 3.x
Example:
mail = mailparser.parse_from_file(fp)
mail = mailparser.parse_from_string(s)
mail = mailparser.parse_from_byte(bt)
- Added three new constructors
from_file
,from_string
andfrom_bytes
Example:
mail = MailParser.from_file(fp)
mail = MailParser.from_string(fp)
mail = MailParser.from_bytes(fp)
- New property
message_as_string
to get the raw email.
⚠️ Breaking Changes ⚠️
- Replace exception
InvalidMail
withValueError