Allow expressions in mailmessage subject

Fixes issue #91
Minor refactoring

Wrap ObjectFormatter-calls in try-catch and cleanups.