On the approximation of $C^M$-functions by means of boundary values