eiffel-community/eiffel-intelligence

Failed MAIL notifications are not saved to database

Closed this issue · 0 comments

Description

When a subscription is triggered and MAIL is chosen as the notification type, any missed notification will not be stored to the database if Eiffel Intelligence was unable to send the email to the subscriber. No missed notification will be created and saved in the database, and the user will not be informed of this.

It should also be noted that EI assumes the configuration for "email.sender" and "email.subject" is set in application.properties, but there is no check on this upon startup. It is possible for users to create subscriptions with MAIL notifications but if EI is not configured with email.sender or email.subject then the notification will fail - and the user will never know.

The documentation should also be updated if needed.

Motivation

A missed notification should be created also after a failed MAIL notification (not only REST POST).

Exemplification

If the user has not specified the right host/port of the mail server, then EI will assume a default mail server running on localhost and port 25. When this fails (in most cases) EI will log an exception, but not save the attempted notification to the database. This means the user will never know that their subscription was triggered, but keep waiting for that email.

Benefits

More reliable behavior by EI, and MAIL notifications will also be saved in missed notification database.

Possible Drawbacks

None that I can think of.