Telegraph companies maintaining and operating stations and offices in the City are required to pay to the City as an occupation tax the sum of three percent of the gross receipts collected in the City, resulting from the business and occupation of receiving messages in the City from persons in the City and transmitting the same by telegraph from the City to persons and places within the state, and receiving in the City messages by telegraph, transmitted from persons and places in the state to persons within the City. There shall be excepted from the provisions of this article all receipts for telegraph service to the United States government or any of its departments and all receipts from the state or any of its departments, and no part of the tax provided for in this article shall be levied upon or assessed against or taken from the United States government, the government of the state or any of either of their departments.