From dfeeec308ac2c683cd3fc3f43f65efe71072af54 Mon Sep 17 00:00:00 2001 From: Julen Landa Alustiza Date: Sat, 1 Apr 2017 21:46:09 +0200 Subject: 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 --- config/accounts.js | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'config') diff --git a/config/accounts.js b/config/accounts.js index 279325fb..e7faa4cd 100644 --- a/config/accounts.js +++ b/config/accounts.js @@ -16,17 +16,12 @@ 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, + sendVerificationEmail: true, showForgotPasswordLink: true, onLogoutHook() { const homePage = 'home'; -- cgit v1.2.3-1-g7c22