Added initial emailing functionality