Did a few minor changes to email handling.
Merge pull request #50 from Agfct/alarmanddiv

Did a few minor changes to email handling.