An electrodynamical theory of the vibrator nanoantenna based on the different types of carbon nanotubes (CNTs) has been presented. The theory covers a wide frequency range from terahertz to optical frequencies. It is based on the quantum-mechanical description of the CNT conductivity. The boundary-value electrodynamical problem has been formulated using the effective boundary conditions method and has been solved by the integral equations technique. As a result, a number of general properties of CNT-based nanoantennas have been revealed. These properties are very promising for potential applications in nanoelectronics, high resolution near field optical microscopy, thermal microscopy, etc.