beyond-all-reason / teiserver

Middleware server for online gaming
https://www.beyondallreason.info/
MIT License
47 stars 47 forks source link

Teiserver swallows all email sending errors #289

Closed p2004a closed 1 month ago

p2004a commented 2 months ago

If sending emails fails, there isn't any error returned to user or log message created.

Calls to Teiserver.Mailer.deliver_now aren't checking the return tuple, and code isn't written to handle failures in sending of the emails: e.g. reset code is created before sending email and not cleaned up if it fails, so if email sending fails it's not logged, user code is still created blocking new recovery codes creation, and user has have to wait 24h to retry sending password link.

StanczakDominik commented 1 month ago

Closed by #290

p2004a commented 1 month ago

@StanczakDominik Is that also handling registration?

StanczakDominik commented 1 month ago

I'll double check

geekingfrog commented 1 month ago

I did a check locally, and it only logs an error, there's no feedback for chobby. The server logs the error:

[error] Error sending new user email - <THE-EMAIL> - {:network_failure, '127.0.0.1', {:error, :econnrefused}}

but the code is still in the database.

I created: https://github.com/beyond-all-reason/teiserver/issues/310