added a mailtype so we dont pass around strings, and so we can be a bit more strict