Implemented custom field value replacement logic in mail delivery system