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

Thunderbird style auto configuration #2493

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

kimboslice99
Copy link

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.

handle case where autoconfig contains multiple emailProviders
check if provider is undefined in case find fails to select the array containing our desired configuration
@bjobjobjo
Copy link

How about that Thunderbird auto config CardDav address book?

carddav

Copy link
Collaborator

@bengotow bengotow left a 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)) {
Copy link
Collaborator

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
@kimboslice99
Copy link
Author

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

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

Successfully merging this pull request may close these issues.

3 participants