Build email function working

Need to test for empty element error handling