transform cpcode for mail