cloned from https://github.com/webOS-ports/core-apps/tree/master/com.palm.app.email