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

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.

4 Likes

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
3 Likes