Fix bug in emailnotifications.py

Fixed a bug where the "sys" module was called in Line 36 but it had not been imported globally yet.