# pydoc > email

---
type: CommandReference
command: email
mode: pydoc
section: ""
source: pydoc3
---

## Quick Reference
- `email.message_from_file(file)` — read a file, return a Message object
- `email.message_from_string(string)` — parse a string, return a Message object
- `email.message_from_bytes(bytes)` — parse a bytes string, return a Message object
- `email.message_from_binary_file(file)` — read a binary file, return a Message object

## Name
email — A package for parsing, handling, and generating email messages.

## Synopsis
python
import email
The `email` package provides functions for parsing email messages.  Submodules include: `base64mime`, `charset`, `encoders`, `errors`, `feedparser`, `generator`, `header`, `headerregistry`, `iterators`, `message`, `mime`, `parser`, `policy`, `quoprimime`, `utils`.  The package defines `__all__` listing the public submodules (e.g., `['base64mime', 'charset', 'encoders', 'errors', 'feedparser'...`).  File: `/usr/lib/python3.10/email/__init__.py`.

## Options
- `message_from_binary_file(file, _class=None, strict=None)` — read a binary file and parse its contents into a Message object model
- `message_from_bytes(bytes, _class=None, strict=None)` — parse a bytes string into a Message object model
- `message_from_file(file, _class=None, strict=None)` — read a file and parse its contents into a Message object model
- `message_from_string(string, _class=None, strict=None)` — parse a string into a Message object model

## Examples
(No examples provided in the original documentation.)

## See Also
[Python email module documentation](https://docs.python.org/3.10/library/email.html)

## Exit Codes
(None documented.)