'Append message to named mailbox.
(typ, [data]) = <instance>.append(mailbox, flags, date_time, message)
All args except `message\' can be None.'

def append(self, mailbox, flags, date_time, message):

    name = 'APPEND'
    if (not mailbox):
        mailbox = 'INBOX'
    if flags:
        if ((flags[0], flags[(-1)]) != ('(', ')')):
            flags = ('(%s)' % flags)
    else:
        flags = None
    if date_time:
        date_time = Time2Internaldate(date_time)
    else:
        date_time = None
    literal = MapCRLF.sub(CRLF, message)
    if self.utf8_enabled:
        literal = (('UTF8    (' + literal) + ')')
    self.literal = literal
    return self._simple_command(name, mailbox, flags, date_time)
