Archived Forum Post

Index of archived forum posts

Question:

Another empty mail with FetchSingleAsMimeAsync

Oct 09 '17 at 03:14

Hi,

got another empty mail when using FetchSingleAsMimeAsync. I can't see any problems from the log:

2017-09-22, 12:21:14 ImapIterator.GetNumberOfObjects Konto 1 mimemails:::andere mailbox 13
....
2017-09-22, 12:21:19 Subject: Fix wie nix: Über 200 schnelle Gerichte für jeden Tag
2017-09-22, 12:21:19 Date: 19.04.16
2017-09-22, 12:22:56 ImapController.getMail mimemails/andere mailboxChilkatLog:
  FetchSingleAsMime(255ms):
    DllDate: Sep 10 2017
    ChilkatVersion: 9.5.0.70
    UnlockPrefix: BEATRX.CB10118
    Architecture: Little Endian; 32-bit
    Language: MAC OS X C/C++
    VerboseLogging: 1
    msgId: 14
    bUid: 1
    ImapCmdSent: aabb UID FETCH 14 RFC822.SIZE
    getCompleteResponse(86ms):
      ImapCmdResp: * 7 FETCH (UID 14 RFC822.SIZE 5734)
      ImapCmdResp: aabb OK UID FETCH completed
    --getCompleteResponse
    fetchSingleComplete(169ms):
      autoDownloadAttachments: 1
      fetchComplete(169ms):
        autoDownloadAttachments: 1
        fetchCompleteA(169ms):
          fetchCommand: aabc UID FETCH 14 (FLAGS INTERNALDATE BODY.PEEK[])
          ImapCmdSent: aabc UID FETCH 14 (FLAGS INTERNALDATE BODY.PEEK[])
          sendCommand: Elapsed time: 0 millisec
          getCompleteFetchResponse(169ms):
            ImapCmdResp: * 7 FETCH (UID 14 FLAGS (Seen $Junk) INTERNALDATE "19-Apr-2016 13:50:18 +0200" BODY[] {5734}
            flagsAndSizeData: * 7 FETCH (UID 14 FLAGS (Seen $Junk) INTERNALDATE "19-Apr-2016 13:50:18 +0200" BODY[] {5734}
            flags: Seen $Junk
            msgSize: 5734
            ImapCmdResp: (5734 bytes)
            receiveMessageData: Elapsed time: 25 millisec
            Finished receiving MIME.
            ImapCmdResp: )
            ImapCmdResp: aabc OK UID FETCH completed
            receiveRemainder: Elapsed time: 0 millisec
          --getCompleteFetchResponse
        --fetchCompleteA
      --fetchComplete
    --fetchSingleComplete
    sbCharset: "UTF-8";
    Success.
  --FetchSingleAsMime
--ChilkatLog
If you want to take a look this is again in the test account where I had sent you the credentials. Mailbox "mimemails:::andere mailbox". Mail has subject "Fix wie nix: Über 200 schnelle Gerichte für jeden Tag".

Regards

Beatrix Willius


Answer

Thanks Beatrix, I'll do some testing today..


Answer

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..

See https://www.example-code.com/xojo/email_body.asp

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?


Answer

Sorry for the late answer.

Ups. That looks like an off-by-one issue on my side. It's the mail "Besser als Lotto - So machen Sie richtig viel Geld". FetchSingleAsMime has the same problem. And older version of the plugin works fine with this mail.

Regards

Beatrix Willius


Answer

Any ideas what might cause this? This is literally the last bug I need to fix for the new version of my app.

In the mailbox " mimemails:::andere mailbox" a few mails have this problem:

2017-10-08, 13:46:39 ImapIterator.nextObject mimemails:::andere mailbox: Besser als Lotto - So machen Sie richtig viel Geld 2017-10-08, 13:46:44 ImapIterator.nextObject mimemails:::andere mailbox: Ab jetzt mit News 2017-10-08, 13:46:45 ImapIterator.nextObject mimemails:::andere mailbox: ☀ PayPal-Konto: Ihr Konto wurde geschlossen ☀ 2017-10-08, 13:46:46 ImapIterator.nextObject mimemails:::andere mailbox: Google Analytics intelligence alert [Apr 29, 2016] 2017-10-08, 13:46:47 ImapIterator.nextObject mimemails:::andere mailbox: Amazon.de empfiehlt "Samsung0000437565 EHS64 Original..." 2017-10-08, 13:46:48 ImapIterator.nextObject mimemails:::andere mailbox: Aktion: 4 Blu-rays für 30 EUR 2017-10-08, 13:46:49 ImapIterator.nextObject mimemails:::andere mailbox: Heute lachen die Preise - 50% sparen!

Or I'm doing something seriously wrong.

Mit freundlichen Grüßen/Regards

Beatrix Willius

http://www.mothsoftware.com Mail Archiver X: The email archiving solution for professionals