added the emailing feature