fills out the api method for mail