mirror of
https://github.com/wekan/wekan.git
synced 2026-01-06 01:28:49 +01:00
Don't send emails if missing smtp host
This commit is contained in:
parent
feafc46bb5
commit
5db786e2dd
4 changed files with 47 additions and 36 deletions
|
|
@ -26,15 +26,17 @@ Meteor.startup(() => {
|
|||
const text = texts.join('\n\n');
|
||||
user.clearEmailBuffer();
|
||||
|
||||
try {
|
||||
Email.send({
|
||||
to: user.emails[0].address.toLowerCase(),
|
||||
from: Accounts.emailTemplates.from,
|
||||
subject: TAPi18n.__('act-activity-notify', {}, user.getLanguage()),
|
||||
text,
|
||||
});
|
||||
} catch (e) {
|
||||
return;
|
||||
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;
|
||||
}
|
||||
}
|
||||
}, 30000);
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue