blob: 31618b241c6114a217a69fae976c419fcce4be70 [file] [log] [blame]
Guido van Rossum39a23cc1997-06-02 21:04:41 +00001\section{Standard Module \sectcode{mailbox}}
2\stmodindex{mailbox}
3
4\renewcommand{\indexsubitem}{(in module mailbox)}
5
6This module defines a number of classes that allow easy and uniform
7access to mail messages in a (unix) mailbox.
8
9\begin{funcdesc}{UnixMailbox}{fp}
10Access a classic unix-style mailbox, where all messages are contained
11in a single file and separated by ``From name time'' lines. \var{Fp}
12is the file object pointing to the mailbox file.
13\end{funcdesc}
14
15\begin{funcdesc}{MmdfMailbox}{fp}
16Access an MMDF-style mailbox, where all messages are contained
17in a single file and separated by lines consisting of 4 control-A
18characters. \var{Fp}
19is the file object pointing to the mailbox file.
20\end{funcdesc}
21
22\begin{funcdesc}{MHMailbox}{dirname}
23Access an MH mailbox, a directory with each message in a separate
24file with a numeric name. \var{Dirname}
25is the name of the mailbox directory.
26\end{funcdesc}
27
28\subsection{Mailbox Objects}
29
30All implementations of Mailbox objects have one externally visible
31method:
32
33\begin{funcdesc}{next}{}
34Return the next message in the mailbox, as a \code{rfc822.Message} object=
35=2E
36Depending on the mailbox implementation the \var{fp} attribute of this
37object may be a true file object or a class instance simulating a file ob=
38ject,
39taking care of things like message boundaries if multiple mail messages a=
40re
41contained in a single file, etc.
42\end{funcdesc}