mirror of
https://github.com/wekan/wekan.git
synced 2025-12-16 23:40:13 +01:00
Fix email settings loading:
MAIL_URL was overriden with database info all the time. Now if MAIL_URL exists is not overwritten and if neither MAIL_URL nor exists valid admin panel data MAIL_URL is not set. MAIL_FROM was ignored. Same behaviour, env variable has bigger priority than database configuration. On both cases, althrought environment variable is set, updating admin-panel mail settings will load new info and ignore the environment variable. Remove some code that is not needed anymore
This commit is contained in:
parent
823aea497b
commit
dfeeec308a
4 changed files with 38 additions and 47 deletions
|
|
@ -26,17 +26,15 @@ Meteor.startup(() => {
|
|||
const text = texts.join('\n\n');
|
||||
user.clearEmailBuffer();
|
||||
|
||||
if (Settings.findOne().mailUrl()) {
|
||||
try {
|
||||
Email.send({
|
||||
to: user.emails[0].address.toLowerCase(),
|
||||
from: Accounts.emailTemplates.from,
|
||||
subject: TAPi18n.__('act-activity-notify', {}, user.getLanguage()),
|
||||
text,
|
||||
});
|
||||
} catch (e) {
|
||||
return;
|
||||
}
|
||||
try {
|
||||
Email.send({
|
||||
to: user.emails[0].address.toLowerCase(),
|
||||
from: Accounts.emailTemplates.from,
|
||||
subject: TAPi18n.__('act-activity-notify', {}, user.getLanguage()),
|
||||
text,
|
||||
});
|
||||
} catch (e) {
|
||||
return;
|
||||
}
|
||||
}, 30000);
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue