In the latest version of my email archiving app I've changed most Chilkat related code to the async methods. I've now got 2 error reports from testers that this sometimes doesn't work. The code does 2 passes: first a header is downloaded. The message ID is checked if it's already in the database. If it's not then the full mail is downloaded with the following code:
dim messageID as Integer = CkoMessageSet.getID(counter - 1) CkoMailTask = CkoImap.FetchSingleAsMimeAsync(messageID, True) call CkoMailTask.run While CkoMailTask.Finished <> true CkoMailTask.SleepMs(50) wend if not CkoMailTask.TaskSuccess then Globals.theErrorLog.LogItem(CurrentMethodName + " " + MailboxPath + " task didn't finish") Return "" end if dim theBody as String = CkoMailTask.GetResultString if theBody = "" then globals.theErrorLog.LogItem(CurrentMethodName + " " + MailboxPath + " wasn't able to load result from task") globals.theErrorLog.LogItem(CurrentMethodName + " " + MailboxPath + setLastErrorForTask(CkoMailTask)) end if
And now the relevant part of the error log when the mail body is empty:
2017-08-25, 9:52:10 AM ImapIterator.GetNumberOfObjects INBOX 25517 2017-08-25, 12:57:58 PM ImapController.getMail INBOX wasn't able to load result from task 2017-08-25, 12:57:58 PM ImapController.getMail INBOXChilkatLog: FetchSingleAsMime: DllDate: May 25 2017 ChilkatVersion: 9.5.0.68 UnlockPrefix: xxx Architecture: Little Endian; 32-bit Language: MAC OS X C/C++ VerboseLogging: 0 msgId: 236230 bUid: 1 fetchSingleComplete: autoDownloadAttachments: 1 --fetchSingleComplete Success. --FetchSingleAsMime --ChilkatLog
Xojo 2017r1, macOS 10.12.6.
Is this a problem or can I ignore the mail?
Mit freundlichen Grüßen/Regards
Beatrix Willius
http://www.mothsoftware.com Mail Archiver X: The email archiving solution for professionals