Skip to content

mail-parser v1.2.0

Compare
Choose a tag to compare
@fedelemantuano 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 file
  • parse_from_string: parsing mail from a string
  • parse_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 and from_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 with ValueError