We consider a model of non-isothermal phase transition taking place in a confined container. The order parameter φ is governed by a Cahn-Hilliard-type equation which is coupled with a heat equation for the temperature θ. The former is subject to a nonlinear dynamic boundary condition recently proposed by some physicists to account for interactions with the walls. The latter is endowed with a boundary condition which can be a standard one (Dirichlet, Neumann or Robin) or even dynamic. We thus formulate a class of initial-and boundaryvalue problems whose local existence and uniqueness is proven by means of the contraction mapping principle. The local solution becomes global owing to suitable a priori estimates.