This paper studies the option pricing problem in a class of models in which dividend yields follow a time-homogeneous diffusion. Within this framework, we develop a new approach for valuing options based on the use of a regularized Fourier transform. We derive a pricing formula for European options which gives the option price in the form of an inverse Fourier transform and propose two methods for numerically implementing this formula. As an application of this pricing approach, we introduce the Ornstein-Uhlenbeck and the square-root dividend yield models in which we explicitly solve the pricing problem for European options. Finally we highlight the main effects of a stochastic dividend yield on option prices.