email implementation