Closed LeMoonStar closed 2 years ago
I think this is basically good to merge. I will look into a way to limit the mail domains that get matched by scanning the registered account identities on first launch and allowing a user to modify that list
I'm also thinking of simply including some non standard headers like x-github-recipient-address
. We can iterate on getting possible recipients from more headers later
I'm also thinking of simply including some non standard headers like
x-github-recipient-address
. We can iterate on getting possible recipients from more headers later
Including non-standard headers is a good idea, however, I believe they should be part of a separate commit/PR.
The current
getRecipient
function only supports finding the first recipient. As an email can have multiple recipients, it should find all of them. Additionally, using Thunderbird's pre-parsed attributes of theMessageHeader
object makes the code much more straightforward.The new
getRecipients
function doesn't filter for the domain, allowing more freedom in the pattern matching. This also avoids having to set the account name to the domain. However, using a wildcard for the domain in the pattern matching will result in the Sort function matching the first recipient it finds no matter the domain, which might not be desirable.As this change introduces support for Cc and Bcc, it resolves #3.