set email in if and else clause after conversion for testing