mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-02-22 15:15:12 +08:00
fix(onboarding): Change how we determine default IMAP settings
Summary: If we don't have IMAP settings for a particular email domain, try to choose based on which provider was selected instead. Fixes #3168 Test Plan: tested locally Reviewers: spang, evan Reviewed By: evan Differential Revision: https://phab.nylas.com/D3721
This commit is contained in:
parent
0b700c424c
commit
0902d99678
2 changed files with 44 additions and 2 deletions
|
@ -1,4 +1,46 @@
|
||||||
{
|
{
|
||||||
|
"yahoo": {
|
||||||
|
"imap_port": "993",
|
||||||
|
"smtp_port": "587",
|
||||||
|
"smtp_user_format": "email",
|
||||||
|
"imap_user_format": "email",
|
||||||
|
"ssl": "1",
|
||||||
|
"smtp_custom_config": {
|
||||||
|
"host": "smtp.mail.yahoo.com",
|
||||||
|
"port": 587,
|
||||||
|
"secure": false,
|
||||||
|
"tls": {"ciphers": "SSLv3"}
|
||||||
|
},
|
||||||
|
"imap_host": "imap.mail.yahoo.com",
|
||||||
|
"smtp_host": "smtp.mail.yahoo.com",
|
||||||
|
"occurences": 2083
|
||||||
|
},
|
||||||
|
"fastmail": {
|
||||||
|
"imap_host": "imap.fastmail.com",
|
||||||
|
"imap_port": "993",
|
||||||
|
"smtp_host": "smtp.fastmail.com",
|
||||||
|
"smtp_port": "465",
|
||||||
|
"smtp_user_format": "email",
|
||||||
|
"imap_user_format": "email",
|
||||||
|
"ssl": "1",
|
||||||
|
"occurences": 68
|
||||||
|
},
|
||||||
|
"icloud": {
|
||||||
|
"imap_port": "993",
|
||||||
|
"smtp_port": "587",
|
||||||
|
"smtp_user_format": "email",
|
||||||
|
"imap_user_format": "email",
|
||||||
|
"ssl": "1",
|
||||||
|
"smtp_custom_config": {
|
||||||
|
"host": "smtp.mail.me.com",
|
||||||
|
"port": 587,
|
||||||
|
"secure": false,
|
||||||
|
"tls": {"ciphers": "SSLv3"}
|
||||||
|
},
|
||||||
|
"imap_host": "imap.mail.me.com",
|
||||||
|
"smtp_host": "smtp.mail.me.com",
|
||||||
|
"occurences": 1624
|
||||||
|
},
|
||||||
"yahoo.com": {
|
"yahoo.com": {
|
||||||
"imap_port": "993",
|
"imap_port": "993",
|
||||||
"smtp_port": "587",
|
"smtp_port": "587",
|
||||||
|
|
|
@ -172,9 +172,9 @@ export function isValidHost(value) {
|
||||||
export function accountInfoWithIMAPAutocompletions(existingAccountInfo) {
|
export function accountInfoWithIMAPAutocompletions(existingAccountInfo) {
|
||||||
const CommonProviderSettings = require('./common-provider-settings.json');
|
const CommonProviderSettings = require('./common-provider-settings.json');
|
||||||
|
|
||||||
const email = existingAccountInfo.email;
|
const {email, type} = existingAccountInfo;
|
||||||
const domain = email.split('@').pop().toLowerCase();
|
const domain = email.split('@').pop().toLowerCase();
|
||||||
const template = CommonProviderSettings[domain] || {};
|
const template = CommonProviderSettings[domain] || CommonProviderSettings[type] || {};
|
||||||
|
|
||||||
const usernameWithFormat = (format) => {
|
const usernameWithFormat = (format) => {
|
||||||
if (format === 'email') {
|
if (format === 'email') {
|
||||||
|
|
Loading…
Reference in a new issue