This paper deals with a boundary optimal control problem associated with the stationary Navier-Stokes equations coupled with the heat equation. The most general type of boundary condition for the temperature is considered. The existence of a solution of this problem and, for some values of the viscosity coefficient, the uniqueness are proved. The control problem consists in finding a temperature of the surrounding medium which leads to a desired configuration of the temperature of the fluid. The existence of an optimal control is proved and necessary conditions of optimality are derived by introducing a family of regularized optimal problems.