Added perliminary email functionality