Since I did not save my password when signing up, I proceeded to set an email. Got a confirmation email and clicked the link in it.
Then signed out and clicked the "Set a new password" link.
But it does not work. I always get the message "Failed to send email: This email address was not found".
this sounds a bit like a Synapse bug.
So the order is like this?:
Or did they set their e-mail only after registration?
@bwindels: Only after registration. I described the whole process here:
Getting more reports of this:

Going to mark this as a fire, given it's a massive regression if people can't add email addresses to their accounts.
(this particular report was on Riot iOS ftr)
Since I did not save my password when signing up, I proceeded to set an email. Got a confirmation email and clicked the link in it.
Then signed out and clicked the "Set a new password" link.
Seems like the user never clicked Continue back in riot-web to confirm the add and call the /add API so their e-mail never got added.

I am assuming this is a case of confusing UX where the user has to do the following flow
ContinueStep 4 seems to be very unclear and very unlike other platforms.
The link in the email tries to help but doesn't do well:

The UX is not the problem.
I follow the exact steps (1.-4.) which you describe and after step 4. I get an error. See screenshots.




What server are you using? Synapse 1.15.0 has a bug with this, should be resolved by 1.15.1
I am using matrix.org.
This issue is about riot-web/desktop - and I cannot reproduce the issue there other than the poor UX.
The 401 is expected and the client should prompt you to verify your password as per the Server's demand. Seek help on the support tracker for the app which you are using.
Alright, then it seems everything works as expected. (I was just hoping to "rescue" my account even though I lost the password and did not set an email address.)
Most Matrix servers will require the Password to be able to add a new e-mail address, seems that there is a bug in riot-ios preventing that prompt from coming up, have reported it to the relevant team.
Thanks!