Initial emailing code checked in. Not stable yet.