Question:
I get the following error when I retrieve A CERTAIN EMAIL ONLY, no other email, they all work just fine.
I want to know if someone knows this error so that I can fix my code to prevent it from happening to users that will using the app, please.
Here is the raw email: http://pastebin.com/Ud2b77s6
Thanks!
ChilkatLog:
FetchSingle:
DllDate: Jun 23 2014
ChilkatVersion: 9.5.0.40
UnlockPrefix: ##############
Architecture: Little Endian; 64-bit
Language: IOS Objective-C
VerboseLogging: 0
msgId: 112
bUid: 1
autoDownloadAttachments: 0
fetchSingleEmailObject:
fetchSingleComplete:
autoDownloadAttachments: 0
fetchComplete:
fetchMsgSummary:
parseSummary:
Failed to find first open paren in IMAP FETCH response.
imapResponse: aaam OK Success
--parseSummary
Parse summary failed.
--fetchMsgSummary
Failed to fetch message summary (UID BODYSTRUCTURE)
--fetchComplete
--fetchSingleComplete
--fetchSingleEmailObject
Failed.
--FetchSingle
--ChilkatLog
Thanks! Unfortunately, the raw MIME of the email doesn't help solve the problem. The issue is in the format of the BODYSTRUCTURE returned by the IMAP server. The only efficient way to solve this problem is if you can provide a temporary test IMAP account on that server with the given email in the INBOX. A different IMAP server would likely send a different BODYSTRUCTURE (also valid and conforming to the IMAP standards). If you can, please send information through private email to support@chilkatsoft.com. I believe it can be quickly sorted out.
The error was by getting the emails by UID and not sequence numbers. So this popped up when there wasnt such bUID email.
int numMessages = [[self NumMessages] intValue];
CkoEmail *newestEmail;
for (int emailNum = numMessages; emailNum > 0; emailNum--) {
newestEmail = [self FetchSingle: [NSNumber numberWithInt:emailNum] bUid:YES];
if (!(newestEmail == nil )) {
NSLog(@"FromAddress: %@ Subject: %@", newestEmail.FromAddress, newestEmail.Subject);
}
}
The fix: newestEmail = [self FetchSingle: [NSNumber numberWithInt:emailNum] bUid:NO];