Refactor out the actual mail-sending