A boundary value problem and the Ehrhard inequality