(self, mailbox)
return uidvalidity
Validate a mailbox.

        Args:
            mailbox (str): the mailbox to check for its *uidvalidity*.

        Returns:
            int: The *uidvalidity* returned from the *imap* server. If it
            cannot be decoded, it returns 0.
Validate a mailbox.
Validate a mailbox .
def get_uidvalidity(self, mailbox):
        """Validate a mailbox.

        Args:
            mailbox (str): the mailbox to check for its *uidvalidity*.

        Returns:
            int: The *uidvalidity* returned from the *imap* server. If it
            cannot be decoded, it returns 0.

        """
        uidvalidity = 0
        mbstatus = self.imap.status(mailbox, '(UIDVALIDITY)')
        if mbstatus[0] == 'OK':
            body = mbstatus[1][0].decode()
            uidval = re.search('UIDVALIDITY ([0-9]+)', body)
            if uidval is not None:
                uidvalidity = int(uidval.groups()[0])
        return uidvalidity
def get_uidvalidity ( self , mailbox ) : uidvalidity = 0 mbstatus = self . imap . status ( mailbox , '(UIDVALIDITY)' ) if mbstatus [ 0 ] == 'OK' : body = mbstatus [ 1 ] [ 0 ] . decode ( ) uidval = re . search ( 'UIDVALIDITY ([0-9]+)' , body ) if uidval is not None : uidvalidity = int ( uidval . groups ( ) [ 0 ] ) return uidvalidity