pub fn append<S: AsRef<str>, B: AsRef<[u8]>>(&self, mailbox: &S, content: &B) -> Result<()> {
        let mut count = 0;
        loop {
            count += 1;
            let mut imap = self.start();
            let result = imap.append(mailbox, content);
            if result.is_err() {
                if count > self.retry_max_count {
                    return result;
                } else {
                    error!(
                        "Previous append attempt failed with {}. Retrying ({}/{})in {} s.!",
                        result.unwrap_err(),
                        count,
                        self.retry_max_count,
                        self.retry_delay
                    );
                    // TODO maybe remove that once code is parallel
                    thread::sleep(time::Duration::from_secs(self.retry_delay));
                }
            } else {
                return result;
            }
        }
    }
/// Appends a new message to the given server.
/// This method decorates the Imap::append method by adding retry ability.

Appends a new message to the given server.
This method decorates the Imap::append method by adding retry ability.
Appends a new message to the given server . This method decorates the Imap :: append method by adding retry ability .
pub fn append<S: AsRef<str>, B: AsRef<[u8]>>(&self, mailbox: &S, content: &B) -> Result<()> {
        let mut count = 0;
        loop {
            count += 1;
            let mut imap = self.start();
            let result = imap.append(mailbox, content);
            if result.is_err() {
                if count > self.retry_max_count {
                    return result;
                } else {
                    error!(
                        "Previous append attempt failed with {}. Retrying ({}/{})in {} s.!",
                        result.unwrap_err(),
                        count,
                        self.retry_max_count,
                        self.retry_delay
                    );
                    // TODO maybe remove that once code is parallel
                    thread::sleep(time::Duration::from_secs(self.retry_delay));
                }
            } else {
                return result;
            }
        }
    }
pub fn append < S : AsRef < str > , B : AsRef < [ u8 ] > > ( & self , mailbox : & S , content : & B ) -> Result < ( ) > { let mut count = 0 ; loop { count += 1 ; let mut imap = self . start ( ) ; let result = imap . append ( mailbox , content ) ; if result . is_err ( ) { if count > self . retry_max_count { return result ; } else { error ! ( " " result unwrap_err ( ) count self retry_max_count self retry_delay ) ; // TODO maybe remove that once code is parallel
 thread :: sleep ( time :: Duration :: from_secs ( self . retry_delay ) ) ; } } else { return result ; } } }
Appends a new message to the given server.
Appends a new message to the given server .
&self
mailbox
&S
content
&B
&self
mailbox
&S
content
&B