Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #911. Set MAIL_URL variable after Meteor.startup #912

Merged
merged 1 commit into from
Sep 28, 2015

Conversation

rwakida
Copy link
Contributor

@rwakida rwakida commented Sep 27, 2015

Set environment value after RocketChat.settings have been initialized.

RocketChat settings are loaded ASAP as of 39fe136
RocketChat.settings depends on Meteor.settings under the covers, but Meteor.settings
doesn't seem to return values until Meteor is fully started. Thus, we
can only call RocketChat.settings.get after Meteor.startup

RocketChat.settings have been initialized.

RocketChat settings are loaded ASAP as of 39fe136
RocketChat.settings depends on Meteor.settings under the covers, but Meteor.settings
 doesn't seem to return values until Meteor is fully started.  Thus, we
can only call RocketChat.settings.get after Meteor.startup
@rwakida
Copy link
Contributor Author

rwakida commented Sep 27, 2015

The MAIL_URL is only set at startup. Changing the SMTP settings via the UI has no effect on the MAIL_URL environment variable. Thus, this fix only works when:

  1. SMTP settings are preconfigured in startup.coffee and NO existing settings in DB.
  2. SMTP settings exist in DB and server is restarted

@geekgonecrazy
Copy link
Contributor

This looks good! So if they change SMTP settings in DB is a restart required pretty much regardless?

@rwakida
Copy link
Contributor Author

rwakida commented Sep 28, 2015

@geekgonecrazy yup, from what I can tell the MAIL_URL is only set at startup (rocketchat-lib/settings/server/startup.coffee file). UI and direct DB changes have no effect on MAIL_URL and therefore email verification.

rodrigok added a commit that referenced this pull request Sep 28, 2015
Fix #911.  Set MAIL_URL variable after Meteor.startup
@rodrigok rodrigok merged commit 46367ab into master Sep 28, 2015
@rodrigok rodrigok deleted the bugfix/smtp-no-longer-works branch September 28, 2015 16:07
@doomdance
Copy link

SMTP for account registration now works but it is still broken for password resetting and re-sending email confirmation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants