Email interface done.

Still doesn't send emails though.