Emails to confirm new admin not being sent

AI-generated summary

Users are experiencing issues with admin confirmation emails not being sent after clicking “Grant Admin” in Discourse. dfremont reported no email logs appearing, prompting SaraDev to recommend checking the Troubleshooting Outgoing Email guide and verifying email provider logs. Alternatives like creating an admin via the console or enabling 2FA to bypass email confirmation were suggested by JammyDodger and Francis_Martens. JammyDodger proposed debugging steps including checking logs, safe mode, browser console errors, and comparing configurations with other affected sites. Ultimately, dfremont resolved the issue by switching from port 587 to 2525 after discovering DigitalOcean was blocking the former — a fix referenced from this post. The issue appears tied to email delivery infrastructure rather than Discourse core, with multiple users reporting similar behavior.

Hi folks,

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?

Thanks,
Daniel

Hi Daniel,

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 :slight_smile:)

Though it is unusual that you’re not seeing a corresponding email log for it. :thinking: Did you manage to track down the issue in the end?

I think there was another similar report recently too - Grant admin confirmation mail not sent

Nope - I update the setting in the database which is an <…> approach
I will try the 2FA route.

I’ve had a think about this and nothing immediately springs to mind. :thinking:

For debugging, I think I’d have to start with a broad brush.

  • Double-check just to be sure it isn’t in the email logs (sent and skipped)
  • Does it work in safe mode?
  • 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.