Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Featurerequest: Include sender name #3

Open
maralorn opened this issue Aug 12, 2019 · 1 comment
Open

Featurerequest: Include sender name #3

maralorn opened this issue Aug 12, 2019 · 1 comment

Comments

@maralorn
Copy link

Thx for email2matrix. Jumped on as soon as I saw it.

It‘s working fine for me, but it would be really useful if there would be an option to include the From header in the matrix message.

@spantaleev
Copy link
Member

spantaleev commented Aug 12, 2019

We can create a new IgnoreSender field for the ConfigurationMatrixMapping (

).

It would default to false, which means that all existing mappings which don't include it will start generating messages that include the sender address. It's a bit of a backward compatibility break.

To fix message generation to take it into account, we would need to redo GenerateMessage() and its tests.

I think the way GenerateMessage() is written makes it a bit hard to introduce new stuff like this (IncludeSender), so it should probably be refactored first.

I wonder if there would be additional things (like IgnoreSender) we might wish to add in the future. It's not necessarily for controlling what data to include in the message. It could also be related to formatting somehow.. We should probably think some more about this, before jumping in and solving the sender-address thing.


Or.. we should just have some kind of template ("template": "# __SUBJECT__\n\n__BODY__") instead of all these variables. We can have a sane default that includes a lot of information. And then people can just override the template for each ConfigurationMatrixMapping to customize it. Us changing the default would no longer cause backward-compatibility changes for people who've explicitly set a value.

Perhaps that's a better way to solve it. It's not as smart as the current GenerateMessage() code though, which acts a bit like the above template, but would smartly skip a # __SUBJECT__ if the subject is empty. However, it's likely unnecessary to have such a feature.. After all, you usually create a mailbox for a specific purpose and that mailbox always receives uniform messages. It's not like one email would contain a subject and then the next one would be subject-only.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants