I’m trying to grant admin privileges to a user in our forum. When I click the “Grant Admin” button, I get the message “We’ve sent you an email to verify the new administrator. Please open it and follow the instructions.” However, no email is sent: if I look on the “Email logs” page, there is no entry for it. Any ideas what might be going wrong?
For investigating email deliverability problems on your site, we have a guide on Troubleshooting Outgoing Email that has recommendations on how you can troubleshoot outgoing email issues that may be present on your site, and explains how email is sent from a Discourse site.
The email logs on your site should show a admin_confirmation_message if the confirmation email had been attempted to have been sent by Discourse. The admin confirmation email should be sending to the address associated with the admin account that you were logged in as when you clicked the “Grant Admin” button.
You may want to check the logs of your email sending provider that you’ve setup your Discourse site to use to see if there are any issues there as well. Any issues with the email not appearing in email provider logs might point to misconfigurations in mail settings or potential email blocking at the service provider level.
If you’re still unable to identify the problem with your email deliverability after going through these steps, you could also consider Creating an admin account from the console, as this will bypass the email verification process.
If you didn’t fancy using the rails console workaround, another option is to enable 2FA for your admin account and then you use the authentication code to confirm granting admin rather than email confirmation (and you’d also have a more secure admin account as a bonus )
Though it is unusual that you’re not seeing a corresponding email log for it. Did you manage to track down the issue in the end?
When you click the ‘grant admin’ button do any errors show up in the browser console?
Is there anything popping up in yoursite/logs?
Does it work for another admin?
With two reports it may be possible to compare yours and @dfremont’s configuration/setup to see if you have anything in common. Any non-official plugins (or plugins in general), anything particularly distinctive about your site settings, etc?
Thanks, everybody. After upgrading Discourse I got a helpful “There are X email jobs that failed” message on the Dashboard. The logs in Sidekiq were not specific (just saying “execution expired”), but led me to this post from someone whose issue was caused by DigitalOcean starting to block port 587. I switched to port 2525 as they suggested and now everything works.