Chilkat Forum

Programming Languages / Environments => Xojo => Topic started by: bwill on December 01, 2017, 01:02:36 AM

Title: Still problems
Post by: bwill on December 01, 2017, 01:02:36 AM
I still haven't solved the problem that we discussed at

This occurs for me again. Also I've got 2 customers with the same problem.

You said

I tested, and everything looked fine to me. The email in question is a multipart/alternative, but with only one alternative body, which is a text/plain body. There is no HTML body in this particular email. You can examine the MIME. If you're calling a method such as email.GetHtmlBody, then it will certainly return nothing because there's no HTML body..


One can't assume an HTML body exists (or that a plain-text body exists..)

Does that explain the problem, or is it something else?

However, this doesn't explain my problems.

- The problem always occurs for me for the same mail.
- I'm using FetchSingleAsMimeAsync and the result is blank. No email.GetHtmlBody involved.
- The mails on the test account don't change much. There are no new mails.

Am I doing something wrong?

1) I do a message set and count the mails:

  CkoMessageSet = new Chilkat.MessageSet
  CkoMessageSet = CkoImap.Search("NOT DELETED", True)
  NoOfMails = CkoMessageSet.Count

2) I get number of headers and check if the mails are available in the database or not.

3) If the mail is not in the database then I get the mail:

Code: [Select]
dim messageID as Integer = CkoMessageSet.getID(counter - 1)
CkoMailTask = CkoImap.FetchSingleAsMimeAsync(messageID, True)
CkoImap.ReadTimeout = 60
While CkoMailTask.Finished <> true

if not CkoMailTask.TaskSuccess then
  Globals.theErrorLog.LogItem(CurrentMethodName + " " + MailboxPath +  " task didn't finish")
  Return ""
end if

dim theBody as String = CkoMailTask.GetResultString
'theBody is empty here


Beatrix Willius