Unable to add additional email or change email on account

AI-generated summary

A user reports an issue where changing or adding an email address on their Discourse account does not trigger a verification email, despite emails working for other functions. The user sees the email added as pending but no email is sent, and no logs are recorded. The issue is isolated to this specific action, as it works on the meta forum. Other users suggest checking if ‘must approve users’ is enabled, but the user confirms it is not. Further investigation reveals a POST request to /u/<username>/preferences/email succeeds with a 200 response, but no email is sent. The user later discovers the issue is caused by DigitalOcean blocking port 587, which prevents email delivery for this action. kenkendk, Moin, sam, kenkendk

I have a user trying to change their email address on the account, and they never see a verification email. I have no issues with general emails being sent and have regular inflow of users signing up, so email is clearly working, but not for this one case.

If I try to add a new email, I get this screen:

And I can see the pending one on my profile:

However, no email is recorded in the email logs, and no information is logged in the Discourse logs. I checked the email provider as well and no emails appear to hit that either. If I repeat adding the same email, I get multiple entries but never any emails sent.

If I do the same on this forum (the meta-one) it works as expected and I see get the email.

So apparently some setting is incorrect in my instance. Any clues as to why this would happen?

Is must approve users enabled on your site? It reminds me of Should a deactivated user receive an email? - #7 by Moin

But I tried and it doesn’t seem to be a problem when I try to change my email address

2 Likes

Thanks for the reply.

No it is open for public signup and that part works fine with emails as well.

Is there anything in the console (HTTP network errors) when they click the button? Is it making a request to Discourse?

@sam yes, I see a POST to /u/<username>/preferences/email with form-data and the new email in the form. The response is a 200 with no body data.

Is there some deeper debugging I can enable that could reveal where the request is stuck?

EDIT: It appears that this is caused by DigitalOcean now blocking port 587.

2 Likes