Skip to content

hooks: Add a new type of hook for getting a sending address #1221

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

dcbaker
Copy link
Collaborator

@dcbaker dcbaker commented Mar 5, 2018

I get a good deal of mail generated by an exchange mailing list. There
is nothing in these mails to tell that they are sent to any specific
address, but I need to reply to them with a specific address, which is
not my primary. It also doesn't make sense to me to change my primary
address, since I rarely compose new mail with the address I need to
reply with in this case.

This adds a hook that is called when trying to determine which address
to reply from. This hook will be passed the email and the ui instance,
and is a coroutine (it must either return a deferred or be an
inlineCallbacks decorated callable). The later is required for the hook
to be able to use the UI for non-trivial tasks, such as prompting the
user.

I get a good deal of mail generated by an exchange mailing list. There
is nothing in these mails to tell that they are sent to any specific
address, but I need to reply to them with a specific address, which is
not my primary. It also doesn't make sense to me to change my primary
address, since I rarely compose new mail with the address I need to
reply with in this case.

This adds a hook that is called when trying to determine which address
to reply from. This hook will be passed the email and the ui instance,
and is a coroutine (it must either return a deferred or be an
inlineCallbacks decorated callable). The later is required for the hook
to be able to use the UI for non-trivial tasks, such as prompting the
user.
@dcbaker
Copy link
Collaborator Author

dcbaker commented Mar 5, 2018

I'm opened to other ideas on how to solve this problem, but ti seems hard to solve in a robust way without something generic like this.

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

Successfully merging this pull request may close these issues.

2 participants