updated for new distribute
unused imports removed
updated format: no sysname in subject, better titles, fixed newlines, new footer text
use config for web ui URL
fix typo
refactor get_event_summary and use in event email notifications