implementing email recovery