From 5db786e2ddca5bc416612778bb0de0d8338003eb Mon Sep 17 00:00:00 2001 From: Julen Landa Alustiza Date: Tue, 28 Mar 2017 12:25:27 +0200 Subject: Don't send emails if missing smtp host --- config/accounts.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'config') diff --git a/config/accounts.js b/config/accounts.js index 51c0f49e..c33d6df2 100644 --- a/config/accounts.js +++ b/config/accounts.js @@ -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) { }; }); } - -- cgit v1.2.3-1-g7c22