Your question basically exposes the difference between the Fourier Series and the Fourier Transform:
The Fourier Series is applicable to periodic signals only, and decomposes it into an infinite discrete sum of sines and cosines whose frequencies are integer multiples of the fundamental frequency.
The Fourier Transform, on the other hand, can be applied to both periodic and non-period signals. If it is applied to a periodic signal, it results in a series of delta functions at the frequencies of the signal's Fourier Series, with scaled amplitude. If it is applied to a non-periodic signal, then it results in a function evaluated at all real multiples of the fundamental frequency.
In fact, the coefficients of the Fourier Series can be seen as the Fourier Transform of the periodic signal evaluated over a single period, for integer multiples of the fundamental frequency. Whereas the Fourier Transform of a signal is an integral evaluated over all $\mathbb{R}$, with omega also taking any value in $\mathbb{R}$.
Very nice answers to a similar questions can also be found on: here and here