moved e-mail retrieval to library