steambird/mail/mailsender.py
def _create_mime_attachment(self, content, mimetype) -> MIMEBase:
        """
        Ensures content is a valid MIMEBase.

        :param content: the content to be converted.
        :param mimetype: the mimetype of the unconverted content.
        :return: a MIMEBase
        """
        if isinstance(content, MIMEText):
            return content

        if isinstance(content, MIMEBase) and\
                'Content-Transfer-Encoding' in content and\
                content['Content-Transfer-Encoding'] != 'base64':

            encode_base64(content)

        return super()._create_mime_attachment(content, mimetype)

        Ensures content is a valid MIMEBase.

        :param content: the content to be converted.
        :param mimetype: the mimetype of the unconverted content.
        :return: a MIMEBase
        
Ensures content is a valid MIMEBase.
Ensures content is a valid MIMEBase .
def _create_mime_attachment(self, content, mimetype) -> MIMEBase:
        if isinstance(content, MIMEText):
            return content
        if isinstance(content, MIMEBase) and\
                'Content-Transfer-Encoding' in content and\
                content['Content-Transfer-Encoding'] != 'base64':
            encode_base64(content)
        return super()._create_mime_attachment(content, mimetype)
def _create_mime_attachment ( self , content , mimetype ) -> MIMEBase : if isinstance ( content , MIMEText ) : return content if isinstance ( content , MIMEBase ) and 'Content-Transfer-Encoding' in content and content [ 'Content-Transfer-Encoding' ] != 'base64' : encode_base64 ( content ) return super ( ) . _create_mime_attachment ( content , mimetype )
Ensures content is a valid MIMEBase.
Ensures content is a valid MIMEBase .
"""
        Ensures content is a valid MIMEBase.

        :param content: the content to be converted.
        :param mimetype: the mimetype of the unconverted content.
        :return: a MIMEBase
        """
None
self
content
the content to be converted.
the content to be converted .
mimetype
the mimetype of the unconverted content.
the mimetype of the unconverted content .