core: handle smtp failures sending vacation messages
core: fix 'can't compare datetime.datetime to NoneType'