PHP 7.4.33
Preview: base.py Size: 916 B
/lib64/python3.6/email/mime/base.py

# Copyright (C) 2001-2006 Python Software Foundation
# Author: Barry Warsaw
# Contact: [email protected]

"""Base class for MIME specializations."""

__all__ = ['MIMEBase']

import email.policy

from email import message



class MIMEBase(message.Message):
    """Base class for MIME specializations."""

    def __init__(self, _maintype, _subtype, *, policy=None, **_params):
        """This constructor adds a Content-Type: and a MIME-Version: header.

        The Content-Type: header is taken from the _maintype and _subtype
        arguments.  Additional parameters for this header are taken from the
        keyword arguments.
        """
        if policy is None:
            policy = email.policy.compat32
        message.Message.__init__(self, policy=policy)
        ctype = '%s/%s' % (_maintype, _subtype)
        self.add_header('Content-Type', ctype, **_params)
        self['MIME-Version'] = '1.0'

Directory Contents

Dirs: 1 × Files: 9

Name Size Perms Modified Actions
- drwxr-xr-x 2025-07-03 05:10:07
Edit Download
1.29 KB lrw-r--r-- 2018-12-23 21:37:14
Edit Download
2.67 KB lrw-r--r-- 2018-12-23 21:37:14
Edit Download
916 B lrw-r--r-- 2018-12-23 21:37:14
Edit Download
1.79 KB lrw-r--r-- 2018-12-23 21:37:14
Edit Download
1.29 KB lrw-r--r-- 2018-12-23 21:37:14
Edit Download
1.58 KB lrw-r--r-- 2018-12-23 21:37:14
Edit Download
691 B lrw-r--r-- 2018-12-23 21:37:14
Edit Download
1.40 KB lrw-r--r-- 2018-12-23 21:37:14
Edit Download
0 B lrw-r--r-- 2025-07-01 22:14:41
Edit Download

If ZipArchive is unavailable, a .tar will be created (no compression).