MCOIMAPFetchContentOperation *operation = [self.imapSession fetchMessageByUIDOperationWithFolder:@"INBOX" uid:m.uid];
[operation start:^(NSError *error, NSData *data) {
NSDictionary* json = [NSJSONSerialization JSONObjectWithData:data
options:kNilOptions
error:&error];
MCOMessageParser *messageParser = [[MCOMessageParser alloc] initWithData:data];
NSString *msgHTMLBody = [messageParser htmlBodyRendering];
[_webView loadHTMLString:msgHTMLBody baseURL:nil];
NSLog(@"%i", i);
}];
使用此代码和gmail api和mailcore2我在NSString msgHTMLbody中获取所有收件箱消息,然后将其分配给webView以显示消息正文但问题是我无法获取发件人的姓名或电子邮件地址。我有办法从该字符串中收到电子邮件..我不认为我可以从该字符串中收到电子邮件。使用邮件核心我们可以得到吗??