def attach_file(self, path, mimetype=None):
        filename = os.path.basename(path)
        content = open(path, 'rb').read()
        self.attach(filename, content, mimetype)
Attaches a file from the filesystem.
dataset/ETHPy150Open CollabQ/CollabQ/vendor/django/core/mail.py/EmailMessage.attach_file