The Fourier transform of a periodic function $f(x)$ is related to its frequency content since
$$\mathcal{F}_x\left[a_n \cos\left(2 \pi \frac{n}{P} x\right)\right](\omega )=\int_{-\infty}^{\infty} a_n \cos\left(2 \pi \frac{n}{P} x\right)\, e^{-2 i \pi \omega x} \, dx\\=\frac{a_n}{2}\, \delta\left(\omega-\frac{n}{P}\right)+\frac{a_n}{2}\, \delta\left(\frac{n}{P}+\omega\right)\tag{1}$$
and
$$\mathcal{F}_x\left[b_n \sin\left(2 \pi \frac{n}{P} x\right)\right](\omega)=\int\limits_{-\infty}^{\infty} b_n \sin\left(2 \pi \frac{n}{P} x\right)\, e^{-2 i \pi \omega x} \, dx\\=\frac{b_n}{2} i\, \delta\left(\frac{n}{P}+\omega\right)-\frac{b_n}{2} i\, \delta\left(\omega-\frac{n}{P}\right)\tag{2}$$
where $\delta(\omega)$ is the Dirac delta function, but the Fourier transform of a periodic function doesn't converge in the usual sense, rather it converges only in a distributional sense.
Its seems to me the notion that the Fourier transform of a non-periodic function $f(x)$ somehow gives the frequency content of the function $f(x)$ analogous to the coefficients of a Fourier series is perhaps a bit misguided since for a non-periodic function $f(x)$ I believe one has
$$c_n=\lim\limits_{P\to\infty}\left(\frac{1}{P} \int\limits_{-\frac{P}{2}}^{\frac{P}{2}} f(x)\, e^{-i 2 \pi \frac{n}{P} x} \, dx\right)=0\tag{3}.$$
For example consider the function
$$f(x)=e^{-\pi^2 x^2}\tag{4}$$
with Fourier transform
$$F(\omega)=\mathcal{F}_x[f(x)](\omega)=\int\limits_{-\infty}^{\infty} e^{-\pi^2 x^2}\, e^{-i 2 \pi \omega x} \, dx=\frac{e^{-\omega^2}}{\sqrt{\pi}}\tag{5}.$$
Now since $f(x)=e^{-\pi^2 x^2}$ is an even function of $x$ consider the Fourier $\cos$ series coefficient
$$a_n=\frac{2}{P} \int\limits_{-\frac{P}{2}}^{\frac{P}{2}} f(x) \cos\left(2 \pi \frac{n}{P} x\right) \, dx=\frac{2}{P} \int\limits_{-\frac{P}{2}}^{\frac{P}{2}} e^{-\pi^2 x^2} \cos\left(2 \pi \frac{n}{P} x\right) \, dx\\=\frac{i e^{-\frac{n^2}{P^2}}}{\sqrt{\pi} P} \left(\text{erfi}\left(\frac{n}{P}-\frac{i \pi P}{2}\right)-\text{erfi}\left(\frac{n}{P}+\frac{i \pi P}{2}\right)\right)\tag{6}$$
where the function $f(x)=e^{-\pi^2 x^2}$ can be approximated on the interval $-\frac{P}{2}<x<\frac{P}{2}$ by the Fourier $\cos$ series
$$f(x)\approx\frac{a_0}{2}+\lim\limits_{N->\infty}\left(\sum_{n=1}^N a_n \cos\left(2 \pi \frac{n}{P} x\right)\right)\tag{7}.$$
For the function $f(x)=e^{-\pi^2 x^2}$ note that
$$\underset{P\to\infty}{\text{lim}}a_n=\underset{P\to\infty}{\text{lim}}\left(\frac{i e^{-\frac{n^2}{P^2}}}{\sqrt{\pi} P} \left(\text{erfi}\left(\frac{n}{P}-\frac{i \pi P}{2}\right)-\text{erfi}\left(\frac{n}{P}+\frac{i \pi P}{2}\right)\right)\right)=0\tag{8}.$$
This is consistent with Parseval's theorem which can be stated as
$$\frac{1}{\pi} \int\limits_{-\pi}^{\pi} f(x)^2 \, dx=\frac{1}{2} (a_0)^2+\sum\limits_{n=1}^\infty \left(a_n^2+b_n^2\right)\tag{9}$$
for a $2 \pi$-periodic representation of a function $f(x)$ and which I believe can be generalized as
$$\frac{2}{P} \int\limits_{-\frac{P}{2}}^{\frac{P}{2}} f(x)^2 \, dx=\frac{1}{2} (a_0)^2+\sum\limits_{n=1}^\infty \left(a_n^2+b_n^2\right)\tag{10}$$
for a $P$-periodic representation of a function $f(x)$ where $a_n$ and $b_n$ are the coefficients of the related $\cos$ and $\sin$ terms in the Fourier series representation of $f(x)$.
For the function $f(x)=e^{-\pi ^2 x^2}$ one has
$$\int_{-\infty }^{\infty } \left(e^{-\pi ^2 x^2}\right)^2 \, dx=\frac{1}{\sqrt{2 \pi }}\tag{11}$$
which implies for the function $f(x)=e^{-\pi ^2 x^2}$ one has
$$\lim_{P\to\infty}\left(\frac{2}{P} \int\limits_{-\frac{P}{2}}^{\frac{P}{2}} f(x)^2 \, dx\right)=\frac{1}{2} (a_0)^2+\sum\limits_{n=1}^\infty \left(a_n^2+b_n^2)\right)=0\tag{12}$$
which implies $a_n=b_n=0$.
Finally, the magnitude of the frequency $\omega_n=\frac{n}{P}$ in the Fourier $cos$ series of an even function $f(x)$ related to the term in formula (1) above is not the value of $F\left(\omega_n\right)$ where $F(\omega)$ is the Fourier transform of $f(x)$, but rather the "energy" at $F\left(\omega_n\right)$ which for an even function $f(x)$ can be calculated as
$$\lim\limits_{\epsilon\to 0^+}\left(2 \int_{\omega_n-\epsilon}^{\omega_n+\epsilon} F\left(\omega-\omega_n\right) \, d\omega\right)\tag{13}$$
which for $F(\omega)=\frac{e^{-\omega^2}}{\sqrt{\pi}}$ in formula (5) above evaluates to zero which is consistent with formulas (3), (8), and (12) above.