How do I re-enable email and logging into my account after restoring backup?

AI 生成的摘要

Users are discussing issues with logging in and email functionality after restoring a Discourse backup. aknudsen reports being unable to log in and emails being disabled post-restoration, questioning why their password is no longer accepted and why email is disabled. codinghorror suggests SSH access and using a Ruby command line to re-enable email, questioning if the backup might be outdated. aknudsen realizes the original site used SSO, suggesting the new site needs SSO enabled. tuttle experiences similar email issues but finds it resolves itself, possibly due to cache. TheDrDentz seeks the specific command to re-enable emails. justin provides the solution: set the disable_emails site setting to no via the command line using rails c.

I just installed a new instance of Discourse and restored a previous backup on it. However, after restoring the backup I am no longer able to log in with my (administrator) account and email is also disabled so that I can’t send myself a reset password mail (I get the notification “All outgoing email has been globally disabled by an administrator. No email notifications of any kind will be sent.”).

  1. Why is my password no longer accepted?
  2. Why is sending of emails disabled?
  3. How do I fix the above?

You will need to SSH in and turn on email via ruby command line.

Really odd that restoring a backup would affect your password, are you sure this was not an old backup, or you are misremembering the email / username of your user? Very strange.

I think I see what the problem is now, after thinking it through a bit. The original site is SSO enabled, so I guess I need to enable SSO in the new site after restoring the backup. How do I do this?

Hi,

I’ve just moved Discourse to a new server and restored from a backup. Same version of Discourse on both server. Send test email works. “Prevent Discourse from sending any kind of emails” is deactivated but I still get the warning
“All outgoing email has been globally disabled by an administrator. No email notifications of any kind will be sent.”

What command is that?
Thanks.

All fixed. by itself! Must have been some cache there somewhere.

I have the same Problem with the outgoing emails. But for me it doesn’t fix itself. Can anyone tell me this magical ruby command line to reenable emails, please?
Thank you!

To re-enable emails, make sure the disable_emails site setting is set to no.

You can set this setting via command line by:

./launcher enter app
rails c
SiteSetting.disable_emails = "no"
exit