Open TheAssassin opened 7 years ago
@TheAssassin how is this reproducable in development?
Just set OSEM_SMTP_ADDRESS
and/or OSEM_SMTP_PORT
to some random host that doesn't exist or at least does not provide an SMTP server (e.g. localhost
and 12345
). Then try to register. OSEM creates the user, and you can login, but after it finished the database interactions, it tries to send the mail to the SMTP gateway, and as the service is not available, a 500 page is rendered and shown.
If you need/want a traceback, tell me and I'll spin up a container.
@differentreality I don't know how important this task so I made quick decision (see in commit). If you say it's okay I will improve it. Problems which I noticed:
redirect_to :back
will return 500 (no such GET route)We ran into this issue and it ended up confusing our users a lot.
If the user registers, could the message be "confirmation mail could not be sent, please go to your profile and try resending later" or something like that? Having the user unable to confirm and not knowing what to do next adds a lot of support burden on us.
Thanks!
Whenever the SMTP server is not available, the very non intuitive error 500 page is displayed. I noticed this every time during registration tests while writing a Dockerfile when an SMTP server was not available, which was the reason for having to set up MailHog for testing.
I think OSEM should display a message like "mail could not be sent, please try again later".