Fix issue if mail is empty or not set
Merge pull request #16 from 'XTDV-master'