API: email improvements
API: email improvements