add email feature, fix a few bugs
Merge remote-tracking branch 'origin/master'