danzuep / MailKitSimplified

Send and receive emails easily, fluently, with one line of code for each operation.
MIT License
80 stars 10 forks source link

How can I see conversations in Mail? #47

Closed gokhannaim closed 3 months ago

gokhannaim commented 1 year ago

Hello,

I want to capture all conversations of an email as a list, can we do this?

What I want to do is to create a view, a user interface, that shows all conversations in an email history.

Thanks.

danzuep commented 1 year ago

You're not the first to try 😁 Here's some more information for you: https://github.com/jstedfast/MailKit/issues/1254#issuecomment-1277881417 If you want to add a simpler implementation of this feature to the library please submit a pull request 🙂

danzuep commented 1 year ago

If anyone does want to implement this, let us know and create a new library with a namespace of MailKitSimplified.Receiver.Gmail. Other features like GMail-specific authentication could be added in the future.

Here's the basic Acceptance Criteria:

Given (setup)

A specified state of a system

A single / selected GMailThreadId.

When (trigger)

An action or event occurs

Some kind of "Conversation View" is requested.

Then (verification)

The state of the system has changed or an output has been produced

  1. Using UniqueId, Fetch() MessageSummaryItems.UniqueId | MessageSummaryItems.Envelope | MessageSummaryItems.References from client.GetFolder(SpecialFolder.All) and group by MessageSummary.GMailThreadId.

  2. Use MessageThreader.Thread() on ThreadingAlgorithm.References Message-IDs to build a nested object.

  3. Sort by ascending date and store as a list for display.

gokhannaim commented 1 year ago

Hello @danzuep , thank you for your interest. I will try.

danzuep commented 3 months ago

Stale issue, closing for now.