mail rest method