title: How to notify myself when a python script runs into an error or just stops?
body: <p>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 <code>exception</code> or when it is done processing.</p>
  
  <p><strong>What is the appropriate way to make this happen?</strong></p>
  
  <p>I thought of sending myself an email from within python using the method shown in <a href="https://stackoverflow.com/questions/348392/receive-and-send-emails-in-python/348551#348551">this SO-Answer</a>, 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).</p>
  
  <p>Any suggestions to bypass that or to make it happen using a more appropriate way?</p>