email retrieval api skeleton