Ios 与hyperpma.com邮件服务器(host.hyperpma.info)的Mailcore MCOIMAPSession
我曾使用Ios 与hyperpma.com邮件服务器(host.hyperpma.info)的Mailcore MCOIMAPSession,ios,email,ios8,mailcore2,Ios,Email,Ios8,Mailcore2,我曾使用Mailcore库在我的一个iOS应用程序上接收和发送电子邮件。 然而,我成功地将它用于流行的电子邮件服务器,如Gmail、Ymail和Hotmail 现在我正试图使用该库从邮件服务器[host.hyperpma.info]或其他电子邮件服务器获取电子邮件 这是我的以下代码: MCOIMAPSession *session = [[MCOIMAPSession alloc] init]; [session setHostname:@"host.hyperpma.info"];
Mailcore
库在我的一个iOS应用程序上接收和发送电子邮件。
然而,我成功地将它用于流行的电子邮件服务器,如Gmail、Ymail和Hotmail
现在我正试图使用该库从邮件服务器[host.hyperpma.info]或其他电子邮件服务器获取电子邮件
这是我的以下代码:
MCOIMAPSession *session = [[MCOIMAPSession alloc] init];
[session setHostname:@"host.hyperpma.info"];
[session setPort:993];
[session setUsername:self.txtEmail.text];
[session setPassword:self.txtPassword.text];
[session setConnectionType:MCOConnectionTypeTLS];//I also try MCOConnectionTypeStartTLS
[session setCheckCertificateEnabled:NO];
MCOIMAPMessagesRequestKind requestKind = MCOIMAPMessagesRequestKindHeaders|MCOIMAPMessagesRequestKindFlags;
NSString *folder = @"INBOX";
MCOIndexSet *uids = [MCOIndexSet indexSetWithRange:MCORangeMake(1, UINT64_MAX)];
MCOIMAPFetchMessagesOperation *fetchOperation = [session fetchMessagesOperationWithFolder:folder requestKind:requestKind uids:uids];
// [SVProgressHUD show];
[fetchOperation start:^(NSError * error, NSArray * fetchedMessages, MCOIndexSet * vanishedMessages) {
//Let's check if there was an error:
if(error) {
NSLog(@"Error downloading message headers:%@", error);
}
}];
我得到的错误如下:
Error downloading message headers:Error Domain=MCOErrorDomain Code=1 "A stable connection to the server could not be established." UserInfo=0x7fa6a1e3cdc0 {NSLocalizedDescription=A stable connection to the server could not be established.}
我是否在代码或设置中缺少某些内容
请帮助我解决此问题。我已经能够使用命令行上的:
openssl s_client-connect host.hyperpma.info:993-crlf
连接到它。听起来你的ISP有问题。我已经在我的ios默认邮件应用程序中使用了相同的电子邮件帐户,并且具有相同的服务器详细信息。我正在同一ISP中使用我的iphone,它可以正常工作。我还尝试使用Connectionlogger检查获取一些错误日志,但它似乎没有连接。