MailCore / mailcore2

MailCore 2 provide a simple and asynchronous API to work with e-mail protocols IMAP, POP and SMTP. The API has been redesigned from ground up.
Other
2.61k stars 624 forks source link

How to use custom command, why do I always return failure when using custom command #1872

Closed ForeverZhangXun closed 4 years ago

ForeverZhangXun commented 4 years ago

MCOIMAPCustomCommandOperation op = [session customCommandOperation:@"a003 ID ()"]; [op start:^(NSString _Nullable response, NSError * _Nullable error) { if (error) { NSLog(@"=====> %@",error); } else {

    }
}];

This always returns error.

ForeverZhangXun commented 4 years ago

I have solved this problem because the serial number cannot be added in the front, it should be that the SDK will automatically add it. Should do as follows: MCOIMAPCustomCommandOperation op = [session customCommandOperation:@"ID ()"]; [op start:^(NSString _Nullable response, NSError * _Nullable error) { if (error) { NSLog(@"=====> %@",error); } else {

}

}];