(a) Any owners, manager, operator or employee of any telegraph or telephone lines operated in the State of Alabama who shall publish or communicate in any way whatsoever or cause or allow to be communicated the contents of any telegram or telephone message sent or received over said line or lines without the consent of either the sender or receiver of the same shall be guilty of a misdemeanor and, on conviction, shall be fined not less than $25.00 nor more than $100.00 and may also be imprisoned in the county jail or sentenced to hard labor for the county for not more than 12 months.
(b) Nothing contained in subsection (a) of this section shall apply when such information is called for by any writ or summons from any court.