Don't send emails if missing smtp host

This commit is contained in:
Julen Landa Alustiza 2017-03-28 12:25:27 +02:00
parent feafc46bb5
commit 5db786e2dd
4 changed files with 47 additions and 36 deletions

View file

@ -17,12 +17,17 @@ AccountsTemplates.addFields([{
template: 'invitationCode',
}]);
let sendVerificationEmail = false;
if (process.env.MAIL_URL) {
sendVerificationEmail = true;
}
AccountsTemplates.configure({
defaultLayout: 'userFormsLayout',
defaultContentRegion: 'content',
confirmPassword: false,
enablePasswordChange: true,
sendVerificationEmail: true,
sendVerificationEmail,
showForgotPasswordLink: true,
onLogoutHook() {
const homePage = 'home';
@ -69,4 +74,3 @@ if (Meteor.isServer) {
};
});
}