def addMessage(message, flags=(), date=None):
        """
        Add the given message to this mailbox.

        @type message: A file-like object
        @param message: The RFC822 formatted message

        @type flags: Any iterable of L{bytes}
        @param flags: The flags to associate with this message

        @type date: L{bytes}
        @param date: If specified, the date to associate with this message.

        @rtype: L{Deferred}
        @return: A deferred whose callback is invoked with the message id if
            the message is added successfully and whose errback is invoked
            otherwise.

        @raise ReadOnlyMailbox: Raised if this Mailbox is not open for
            read-write.
        """

        Add the given message to this mailbox.

        @type message: A file-like object
        @param message: The RFC822 formatted message

        @type flags: Any iterable of L{bytes}
        @param flags: The flags to associate with this message

        @type date: L{bytes}
        @param date: If specified, the date to associate with this message.

        @rtype: L{Deferred}
        @return: A deferred whose callback is invoked with the message id if
            the message is added successfully and whose errback is invoked
            otherwise.

        @raise ReadOnlyMailbox: Raised if this Mailbox is not open for
            read-write.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/mail/interfaces.py