-
Notifications
You must be signed in to change notification settings - Fork 917
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
Thunderbird style auto configuration #2493
base: master
Are you sure you want to change the base?
Conversation
handle case where autoconfig contains multiple emailProviders
check if provider is undefined in case find fails to select the array containing our desired configuration
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks great! I appreciate how defensively you've written the code (checking that keys exist, etc) since I imagine that these will vary / be implemented partially incorrectly by clients.
Is there a domain / set of domains you've been testing this with? I think we can ship it but it'd be nice to run it through a bunch to test it first! Our big lookup table of provider settings also comes from Thunderbird, so I think with this the autoconfig capabilities of Mailspring should largely match! Super cool.
let smtpDetails = null; | ||
|
||
// Handle IMAP | ||
if (Array.isArray(provider.incomingServer)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if there's a case where provider could exist but provider.incomingServer (or outgoingServer) is missing? It might be nice to do an early return false in that case too.
and add extra check for incoming/outgoing server config element
I have only been testing with my own handful of domains, I am not sure of any publicly available providers that use thunderbird autoconfig. Indentation was all messed up (VS Code was being a nuisance) and I did add another check for the incoming/outgoing server |
Saw this on the feature requests some years ago, though I didn't have the skills to accomplish it at the time.
I have tried to handle every scenario, multiple providers, multiple incoming/outgoing servers, etc.