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

Auto switch only when all recepients match with a domain not working #96

Open
stmichaelis opened this issue Apr 21, 2023 · 0 comments
Open

Comments

@stmichaelis
Copy link

stmichaelis commented Apr 21, 2023

I have the exact use case fitting this implemented feature request: #51

Unfortunately, this does not seem to work (completely) for me. Simplified scenario: I have a signature for external recipients, which is set as default, and a signature for internal recipients. The latter should be used in cases where all addressees are internal only. The "auto switch" field is populated like *xyz.de,*xyz.com as multiple domains count as internal.

The signature switches fine when adding emails matching the first pattern (ending on xyz.de). But the signature still switches back to external once I add another email matching the second pattern, treating this as external.

Workaround:
Trying to understand the source code in

let anyAutoSwitchItemMatchesWithAllRecipients = (autoSwitchItems, recipients) => {
and the way regexp are used for the matching, I replaced the comma separating email patterns with | in the auto switch field, which should be the regexp-OR operator for matching multiple patterns?
Using this separator, the auto switch works as intended. I wonder about the exact why and implications, and why the pattern matching works for the other case, when the "all recipients need to match one of the criteria" is unchecked.

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

1 participant