sync emails logic updated