mail support + tests
Merge remote-tracking branch 'origin/master'