|
|
|
|
@ -159,6 +159,7 @@ if (Meteor.isServer) { |
|
|
|
|
}; |
|
|
|
|
Settings.insert(defaultSetting); |
|
|
|
|
} |
|
|
|
|
/* |
|
|
|
|
if (isSandstorm) { |
|
|
|
|
// At Sandstorm, Admin Panel has SMTP settings
|
|
|
|
|
const newSetting = Settings.findOne(); |
|
|
|
|
@ -171,7 +172,9 @@ if (Meteor.isServer) { |
|
|
|
|
// Not running on Sandstorm, so using environment variables
|
|
|
|
|
Accounts.emailTemplates.from = process.env.MAIL_FROM; |
|
|
|
|
} |
|
|
|
|
*/ |
|
|
|
|
}); |
|
|
|
|
/* |
|
|
|
|
if (isSandstorm) { |
|
|
|
|
// At Sandstorm Wekan Admin Panel, save SMTP settings.
|
|
|
|
|
Settings.after.update((userId, doc, fieldNames) => { |
|
|
|
|
@ -191,6 +194,7 @@ if (Meteor.isServer) { |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
*/ |
|
|
|
|
|
|
|
|
|
function getRandomNum(min, max) { |
|
|
|
|
const range = max - min; |
|
|
|
|
@ -237,7 +241,7 @@ if (Meteor.isServer) { |
|
|
|
|
subject: TAPi18n.__('email-invite-register-subject', params, lang), |
|
|
|
|
text: TAPi18n.__('email-invite-register-text', params, lang), |
|
|
|
|
}) |
|
|
|
|
} else { |
|
|
|
|
} else if (process.env.MAIL_URL !== '') { |
|
|
|
|
Email.send({ |
|
|
|
|
to: icode.email, |
|
|
|
|
from: Accounts.emailTemplates.from, |
|
|
|
|
@ -351,7 +355,7 @@ if (Meteor.isServer) { |
|
|
|
|
subject: TAPi18n.__('email-smtp-test-subject', { lng: lang }), |
|
|
|
|
text: TAPi18n.__('email-smtp-test-text', { lng: lang }), |
|
|
|
|
}) |
|
|
|
|
} else { |
|
|
|
|
} else if (process.env.MAIL_URL !== '') { |
|
|
|
|
Email.send({ |
|
|
|
|
to: user.emails[0].address, |
|
|
|
|
from: Accounts.emailTemplates.from, |
|
|
|
|
|