def add_content(self, content, mime_type=None):
if isinstance(content, str):<EOL><INDENT>content = Content(mime_type, content)<EOL><DEDENT>if content.mime_type == "<STR_LIT>":<EOL><INDENT>self._contents = self._ensure_insert(content, self._contents)<EOL><DEDENT>else:<EOL><INDENT>if self._contents:<EOL><INDENT>index = len(self._contents)<EOL><DEDENT>else:<EOL><INDENT>index = <NUM_LIT:0><EOL><DEDENT>self._contents = self._ensure_append(<EOL>content, self._contents, index=index)<EOL><DEDENT>
Add content to the email

        :param contents: Content to be added to the email
        :type contents: Content
        :param mime_type: Override the mime type
        :type mime_type: MimeType, str