I have a python script which runs on Ubuntu and processes the content of a MySQL Database. I want to be informed when the script runs into an unhandled exception or when it is done processing.

What is the appropriate way to make this happen?

I thought of sending myself an email from within python using the method shown in this SO-Answer, but to be able to do that I have to hardcode my logindata - which I am not comfortable with (the script runs on a public server within the company).

Any suggestions to bypass that or to make it happen using a more appropriate way?

Edit
Report