Basic APIs and wrapper for mail processing