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.59k stars 623 forks source link

cant move a message #1950

Closed JyHiting closed 1 year ago

JyHiting commented 1 year ago

i want move a message from one folder to other then i implement this method: moveMessagesOperationWithFolder:folder uids:uids destFolder:destFolder

code like this:

        MCOIMAPSession *imapSession = [[MCOIMAPSession alloc] init];
        [imapSession setHostname:@"my host name"];
        [imapSession setPort:@"my port"];
        [imapSession setUsername:@"my username"];
        [imapSession setPassword:@"my pwd"];
        [imapSession setConnectionType:MCOConnectionTypeTLS];
     MCOIMAPMoveMessagesOperation *op =[imapSession moveMessagesOperationWithFolder:folder uids:uids destFolder:destFolder];
        [op start:^(NSError * _Nullable error, NSDictionary * _Nullable uidMapping) {}

but i get a error like so:

Error Domain=MCOErrorDomain Code=1 "A stable connection to the server could not be established." UserInfo={NSLocalizedDescription=A stable connection to the server could not be established.}

Can anyone help me? I don't know why? maybe server not support move cmd?