lkosson / full-address-column

Thunderbird add-on to show full sender and recipient address column in message list
MIT License
39 stars 11 forks source link

[Feature request] Showing raw addresses in Correspondents column #2

Open kanlukasz opened 3 years ago

kanlukasz commented 3 years ago

Hello, Could you please add an option (column) to show raw addresses in the Correspondents column?

lkosson commented 3 years ago

I'm not quite sure how to determine whether message is inbound or outbound from TB API, as original Correspondents column does - especially for folders containing both outgoing and incoming messages, for instance gmail's "All Mail" folder.

kanlukasz commented 3 years ago

Oh, ok, I didn't know it's complicated. Unfortunately, I have no idea how to help because I mainly work with PHP 😞

AdamTT commented 3 years ago

I'm not quite sure how to determine whether message is inbound or outbound from TB API, as original Correspondents column does - especially for folders containing both outgoing and incoming messages, for instance gmail's "All Mail" folder.

Hi, I'm not java (or else) programmer, so I'm not sure if U can code it, but my idea is:

  1. read address twice
    • first from 'Corespondents' column,
    • second from 'recipient' column for example.
  2. compare those 2 addresses
    • if they are the same - it is incoming message,
    • else it is outcoming message.
  3. Display proper icon followed by address from 'Corespondents' column,

If icon is to complicated then maybe it is enough to display: '> ' or '>> ' for out- and '< ' or '<< ' for incoming nessage

Anyway, thank You for this 'must have' ext.

lkosson commented 3 years ago

The problem is I don't know how or if it is even possible to fetch content of "Corespondents" column programmatically.

AdamTT commented 3 years ago

Well, I understand. I guess U read addresses direct from particular message headers, right?

lkosson commented 3 years ago

More or less - yes. The addon uses nsIMsgDBHdr as defined in https://hg.mozilla.org/comm-central/file/tip/mailnews/base/public/nsIMsgHdr.idl

AdamTT commented 3 years ago

I see nsIMsgDBHdr reads only few headers. It is not able to check (for example) presence of header 'Delivered-To:' or 'Received:'?

lkosson commented 3 years ago

I don't think so. There are getProperty and getStringProperty methods, but they don't seem to have access to arbitrary MIME header - most likely because they operate on Thunderbird's internal message database, not a raw e-mail content.

AdamTT commented 3 years ago

OK, I give up. Just promise me you will leave the note here if u discover a solution in the future. PS. Mówisz po polsku, nie? :)

lkosson commented 3 years ago

Sure will. I'll leave this issue open as long as it is relevant. PS. Tak :-)