Mail restructured

supersedes #140