mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-09-05 20:24:26 +08:00
fix: Mail server configuration cannot be performed when the domain name does not have a built-in template.
Create a fallback template. When the built-in template corresponding to the domain name cannot be found, use the fallback template to configure the server.
This commit is contained in:
parent
56f581ff46
commit
95567b5503
1 changed files with 8 additions and 2 deletions
|
@ -152,8 +152,14 @@ export async function expandAccountWithCommonSettings(account: Account) {
|
|||
}
|
||||
console.log(`Using Mailspring Template: ${JSON.stringify(mstemplate, null, 2)}`);
|
||||
} else {
|
||||
console.log(`Using Empty Template`);
|
||||
mstemplate = {};
|
||||
console.log(`Using Fallback Template`);
|
||||
mstemplate = {
|
||||
"imap_host": `imap.${domain}`,
|
||||
"imap_user_format": "email",
|
||||
"smtp_host": `smtp.${domain}`,
|
||||
"smtp_user_format": "email",
|
||||
"container_folder": "",
|
||||
};
|
||||
}
|
||||
|
||||
let imap_port = Number(mstemplate.imap_port);
|
||||
|
|
Loading…
Add table
Reference in a new issue