the question as to the right of the State to commence a suit by attachment, we think, is not presented by the record before us. Under our decisions, it is well settled, that, upon a demurrer to the declaration, the defendant cannot raise the objection that he is not regularly before the court.—Findlay v. Pruit, 9 Port. 195; Palmer v. Lesne, 3 Ala. 141; Griffin v. The Bank of the State of Alabama, 6 ib. 908; Jordan v. Hazard, 10 ib. 221. In the case of Jordan v. Hazard, supra, the suit was commenced by attachment, and the defendant craved oyer of the original writ, and demurred, upon the ground that the attachment was sued out for a cause not warranted by the attachment law. The case was elaborately argued, and the court declined to consider the question which was attempted to be raised, for the reason that it was not presented by the demurrer, which brought to view the declaration only, and did not authorize an examination into the validity and legality of the attachment. The principal upon which these decisions rest, is applicable to the case under consideration. The object of the law in ' relation to original attachments, considered with reference to the pleadings, was, to provide the means by which, in certain cases, it was allowable to *86bring the defendant into court ; and he could not, by a demurrer to the declaration, inquire into the regularity or legality of the proceeding through the medium of which that object was accomplished. As the State had a clear right to sue, (Cox et al v. U. States, 6 Peters 172; Story on the Constitution § 1271,) and as the declaration contained a substantial cause of action, the demurrer was correctly overruled.
On the trial, it was proved, that Van Dyke received from the Branch Bank at Huntsville, upwards of six thousand dollars duo from that corporation to the State under the statute abolishing taxation,* and directing the expenses of the government to bo paid by the State Bank and its Branches ; that he also received from the tax collectors of Mobile and Sumter Counties, certain sums on account of taxes due to the State from those counties, and that the money was received by him during the period ho was Comptroller of Public Accounts. The court was requested to charge, that the evidence as to each and all these items was insufficient to authorize a recovery; and the refusal to give these charges, presents the question whether, upon the law applicable to the case, the State upon this evidence was entitled to recover.
In the case of The Governor v. Walker, 22 Ala. 118, we held, that the Comptroller was simply the accounting officer of the government, and that, in the absence of any special authority given by law, payments of the public dues made to him were unauthorized and invalid. It can make no difference, in principle, whether the amounts which he received were considered as payments by the parties, or whether the money was simply deposited in his hands, to be paid by him into the treasury : in neither case did the law confer upon him the authority to receive it; and, under the decision we have referred to, the liability of the Bank in the one case, and the tax collector and his sureties in the other, continued, until they had absolved themselves from responsibility by the payment of the States dues to the public treasurer, who was the only person authorized by law to receive them.
When an agent pays the money of his principal to a person who has no authority to receive it, the principal, it is true, can recover the amount thus paid of the receiver, in an action for *87money had and received; but this action' can, in such case, only be maintained on the ground of the confirmation of the payment.- —Billion v. Hyde, 1 Atk. 128; Smith v. Hodson, 4 T. R. 211; Hovil v. Pack, 7 East 164; Conn v. Penn, 1 Pet. C. C. R. 496; Ferguson v. Carrington, 9 B. & C. 59; Copeland v. Mer. Ins. Co., Pick. 198; Paley on Agency (by Loyd) 122, and note; ib. 172, 173. The bringing of an action for money had and received, against the receiver, amounts to a ratification, and has the same effect upon the agent, as if he had an original authority; (Conn v. Penn, supra; Story on Agency § 244, and cases cited;) and, therefore, operates to discharge the agent from the -'consequences of his act to the principal. — Story on Agency § 243, and cases there cited. The case of Sledge v. Tubb, 11 Ala. 383, seems to maintain a different doctrine; but the positions we have asserted have been too long recognized, and rest upon loo firm a basis of principle and authority, to be shaken.
Applying these principles to the case before us, it is obvious that a ratification by the State of the act of the Bank, or the tax collectors, in making the payments to or deposits with Van Dyke, is an essential requisite to the support of the present action. In the language of Judge Story, '(Story on Agency § 259,) “ the suit would not, on any other ground, be maintainable,” and it is equally true, that a ratification of these acts, must discharge both the Bank and the tax collectors from their liability. The question is, can the State ratify these acts, without a law to that effect. If it cannot, it follows, necessarily, that, if no such law exists, a suit which can only be maintained on the principle of ratification cannot be sustained at all. We have seen from the case of Walker v. The Governor, supra, that the payment of this money to Van Dyke was unauthorized. In that case, the suit was against a tax collector who had paid a portion of the money sought to be recovered to the same person who is the defendant below in the present suit, and taken his receipt for the money thus paid. The receipts ■were received by an agent appointed by the Governor, to be used as evidence against Van Dyke in the present suit. It was insisted that this was a ratification by the State of the payments made by the tax collector to Van Dyke. The court, upon this point, say: “ As to the ratification by the State of the pay*88ments made to Van Dyke: T*he authority to receive the public revenue could only be conferred upon the latter by law ; and if the law did not confer this authority, no officer or agent of the State could do so; and if no officer could authorize the payment, none could afterwards affirm it. It could only be done by the sovereign power of the State.” No statute has been passed confirming the payment to the plaintiff in error of the money which the evidence shows this suit was brought to recover: the State has conferred the power of ratification upon no officer, and in the absence of authority to confirm, an action depending upon the confirmation cannot bo maintained.
It may be necessary to notice, very briefly, the argument that the right of the State to sue being conceded, it stands with reference to that right upon the same ground as an individual, and, as the latter may elect to sue the party receiving the money, the State may make the same election. An individual has the right to ratify the unauthorized act of his agent, in any way he may select: all that is necessary, is, that he should manifest his assent to the act. The State can ratify by the law alone. The Legislature has declared, in effect, that the public revenue shall be paid to the public treasurer, and the State must act in obedience to its own laws. If this suit can be maintained, the law which requires these payments to be made to that officer, is changed, — an unauthorized payment made to another individual is legalized, and, in the particular instance, the law is repealed and abrogated, without the action of the Legislature.
As our decision on this point must be decisive of the case, it is unnecessary to meet any of the other questions presented by the record. The court below, upon the evidence, should have charged that the plaintiff could not maintain the action.
The judgment must be reversed, and the cause remanded.