[S22.Imap] Get only the subjects

[S22.Imap] Get only the subjects

  
Forge Component
(0)
Published on 14 Apr (9 days ago) by Pedro Freire
0 votes
Published on 14 Apr (9 days ago) by Pedro Freire

Hi Pedro. 

Quick question:

This extension allows to retrieve only the email subjects? (I didn't figure out how, at first glance)


Basically, I want to present only a list of topics / subjects on the screen.

And only when the user clicks on each item, the app will retrieve the complete email, and attachments  (if available).


best regards

IMAP is the underlying protocol for all native e-mail clients on desktop and mobile, if you want to keep your e-mail on the server so you can share messages across your devices.

What you want is a functionality similar to a mailbox message list. You can do this with the Search action, asking it to list all messages.

You may read the original documentation to learn more: http://smiley22.github.io/S22.Imap/Documentation/

Ok,

I will take a took.

Thank you.

After analysing the documentation, I realized that is not possible to retrieve only the headers.

But I manage to filter the Seach by date invervals. This acts like an workaround to me, to decrease the volume of data transfered over the network.

Actually, you should be able to get all headers.

Search gives you a list of UIDs, then GetMessagesPartial takes that list, plus an Options input parameter that you can set to the string "HeadersOnly", and it returns a list of full MailMessages structures which will have their bodies empty, but their headers filled in.

That's the theory anyway. I haven't tested it.

Please let me know if it works. :-)

Gonçalo,

I can now replicate your GetMessage[s] issue, and it seems the same error you find with GetMessage also occurs with GetMessagesPartial. I'm trying to debug the issue, but I don't have access to my usual development environment, so this may take a while.

Ok Pedro.

No prob.

Thanks for your replies.

Hello Gonçalo,

I have hopefully squashed all the bugs. GetMessage[s]Partial should work for you now (it worked for me), if you download the latest stable version.

Happy coding! :-)