BU-ISCIII / relecov-tools

set of helper tools for the assembly of the different elements in the RELECOV platform (Spanish Network for genomic surveillance of SARS-Cov-2) as data download, processing, validation and upload to public databases, as well as analysis runs and database storage.
GNU General Public License v3.0
5 stars 22 forks source link

Mail sender #328

Closed OPSergio closed 2 weeks ago

OPSergio commented 1 month ago

This PR implements the automated email notification module as described in issue #317. Closes #317

Shettland commented 1 month ago

The reason why I don't recommend to use those big try/excepts within the code of the module (class, methods, etc.) is because its not a good practice. It's better to handle just certain known errors that you clearly know what to do with when they appear; and let the rest to raise so it can be catched (or not) when you call it from other place (like you are doing in main). If you catch all possible errors with except Exception, when you try to implement it in another module (say wrapper) you will only receive None, None and you won't get why it failed if you don't pay attention to the prompt