Additional Methods of Message objects

mimetools.Message Methods

The mimetools.Message class defines the following methods in addition to the rfc822.Message class:


\begin{funcdesc}{getplist}{}
Return the parameter list of the \code{Content-type...
... will return the Python list \code{['spam=1',
'spam=2', 'Spam']}.
\end{funcdesc}


\begin{funcdesc}{getparam}{name}
Return the \var{value} of the first parameter (...
...otes of the form
\var{<...>} or \var{''...''}, these are removed.
\end{funcdesc}


\begin{funcdesc}{getencoding}{}
Return the encoding specified in the \samp{Conte...
... return \code{''7bit''}. The
encoding is converted to lower case.
\end{funcdesc}


\begin{funcdesc}{gettype}{}
Return the message type (of the form \samp{\var{type...
...eturn \code{''text/plain''}. The type is converted to lower
case.
\end{funcdesc}


\begin{funcdesc}{getmaintype}{}
Return the main type as specified in the \samp{C...
...return \code{''text''}. The main type is
converted to lower case.
\end{funcdesc}


\begin{funcdesc}{getsubtype}{}
Return the subtype as specified in the \samp{Cont...
... return \code{''plain''}. The subtype is
converted to lower case.
\end{funcdesc}