Email handling

This makes it all work.