Does changing admin e-mail address work with the new address?

AI-generated summary

myoan asks if changing the admin email address works when the current email is inaccessible. pfaffman explains that Discourse sends confirmation to the old email as a security measure. If another admin account exists, they can remove and reassign admin privileges. For self-hosted setups, a new admin account can be created via the command line, ensuring the new email isn’t already in use.

Hello!

My Discourse e-mail hasn’t been updated for a while and I lost access to the e-mail address that Discourse has stored in my Admin profile. I can still connect to Discourse so I tried changing my e-mail address. Although Discourse 2.4.0.beta7 says it has sent a mail to the new e-mail address, I don’t receive anything (but the SMTP test works well), and I can read a confirm_old_email template sent to me in the “sent mail” logbook.

Does that mean that Discourse is trying to send me an e-mail on the account I can no longer access to?

Yes. This is a security feature to keep someone finding your logged in browser and stealing your admin account.

If you have other admin accounts, you can have them remove admin privileges from your account, then you change the address, then they make you an admin again.

If you don’t have another admin account, then if you’re self-hosted you can add one with

cd /var/discourse
./launcher enter app
rake admin:create

Note that you won’t be able to use one email address for two accounts, so make sure that this account doesn’t use the one that you want to change yours to.