wanglin86769 / clog2

Compact Electronic Logbook System
Other
4 stars 2 forks source link

E-Mail notification on new entry? #4

Open eddybl opened 5 days ago

eddybl commented 5 days ago

Hey,

quite an important feature of the PSI ELog we used so far was the ability to automatically create an e-mail notification to a given e-mail address (which includes the content of the elog entry, including attachments).

As far as I am aware, this option currently does not exist, so I wonder how difficult it would be to implement? One possibility would be to add another field to the logbook management page, where one could add a notifiaction email for new entries?

Or, maybe a different approach: Can you outline an approach using the API to "mimic" this behaviour? (It would be important, that these notifactions would be send independently how the entry is created, so basically a hook or watchdog)

wanglin86769 commented 5 days ago

Thanks for your suggestion, this feature can be implemented.

wanglin86769 commented 4 days ago

The email notification feature has been implemented with SMTP approach. That is, when a log entry is created, updated, or deleted, the logbook observers will receive a email notification.

Step 1 SMTP client needs to be configured in backend/config/smtp.js and frontend URL needs to be configured in backend/config/frontend.js.

Step 2 Observers, which receive notification emails, need to be configured on logbook management page.

image

image

eddybl commented 4 days ago

That looks great, thank you very much!