Plaintiff and appellant Largilliere Company, a copartnership, brought an action in the probate court and caused an attachment to be levied upon 1,000 head of sheep then in Caribou county, Idaho, belonging to Joseph Brun, defendant in that action, who had prior to this time given to one of the respondents herein, the Security State Bank, a Utah corporation, whose principal place of business was at Ogden, in that state, his promissory note, which note was also secured by a chattel mortgage upon these same sheep. At the time the attachment was levied, the respondent bank had commenced foreclosure proceedings under C. S., sec. 6380 et seq., and the sheriff was in possession of the sheep and *232was proceeding to foreclose under respondent bank’s said mortgage.
Appellant commenced this action against respondent Mc-Conkie, as sheriff, and said banking corporation, to restrain the sale of the sheep under the foreclosure proceedings. In its complaint, appellant alleges that it had' commenced an action against Brun, and had caused to be levied against these sheep a writ of attachment: it is alleged upon information and belief that the Security State Bank was a noncomplying foreign corporation, doing business in the state of Idaho, and that the mortgage which respondent bank was seeking to foreclose had never been recorded in said Caribou county, and positively alleged that the affidavit of foreclosure recited that the mortgage had been executed in 1917 upon sheep located in Idaho, and again upon information and belief alleged that the respondent bank had neglected to make any peaceful demand for possession of the sheep prior to placing the affidavit in foreclosure in the hands of the sheriff, although the mortgagor Joseph Brun was then in Caribou county. It is further - alleged that the respondent sheriff had these sheep in his possession at the time appellant’s attachment was levied upon them. Appellant prayed that the court adjudge respondent bank to have no interest in said sheep, that it direct the sheriff to sell the same and satisfy appellant’s judgment obtained in his action against the mortgagor Brun, that its attachment lien be declared prior to the respondent bank’s mortgage lien, and that the sheriff be restrained from selling the sheep under the foreclosure proceedings until the issues between the parties could be determined.
An order to show cause was issued, and the respondent bank answered, and among other things alleged that the note and mortgage on the sheep were executed in Utah, at which time the sheep were in Bingham county, Idaho, but later were removed to Minidoka pounty, that a copy of said mortgage was recorded in that county, and that it was immaterial whether such mortgage had also been filed in Caribou county, for the reason that before appellant’s attachment had been *233levied, the mortgagor Brun had delivered the sheep into the possession of the sheriff, and he was foreclosing said mortgage under the terms thereof, and that appellant had knowledge of these facts, both before and after its attachment.
Upon a return of the order to show cause, testimony was taken, and the court below held that appellant was not entitled to injunctive relief; that the possession of the sheep by the sheriff of Caribou county under the affidavit and notice of foreclosure by the respondent bank was lawful, and that said sheriff was authorized to make the sale of the sheep under the foreclosure proceedings. The court denied the motion for a temporary restraining order, and from the judgment this appeal is taken.
■ Appellant relies upon the assignments that: (1) the judgment is not supported by the pleadings or evidence and is contrary to law; (2) the court erred in holding that the chattel mortgage of the respondent bank was a foreign contract; (3) in holding that said bank had any lien upon the sheep in Caribou county by reason of any recorded mortgage; (4) in holding that the affidavit in foreclosure of chattel mortgage was sufficient, when it did not show that peaceable possession of the sheep had been demanded prior to the sheriff taking possession; (5) in holding that respondent bank had any rights under the chattel mortgage, because of its having failed to comply with the law relative to foreign corporations doing business within this state.
Respondent bank, in its answer by way of return to the order to show cause why it should not be restrained from proceeding to foreclosure of its chattel mortgage, challenges the sufficiency of the complaint to state a cause of action, and denies that it shows any equities in favor of appellant as against respondent, sufficient to warrant a court in exercising its equitable powers.
Appellant alleges upon information and belief that respondent corporation is a foreign corporation doing business in the state of Idaho without having complied with the laws of the state governing foreign corporations. In order for a foreign corporation to qualify in this state as a domestic *234corporation, under art. 11, sec. 10, of the constitution and C. S., sec. 4772, it must file a copy of its articles of incorporation, certified by the Secretary of the State where it has been organized, with the county auditor of the county in which it proposes to do business, and the auditor must send a certified copy of these articles to the Secretary of State. It is therefore clear that the matter of whether or not a foreign corporation has qualified to do business in this state is a matter of public record, and cannot be properly alleged upon information and belief, and such an allegation does not raise any issue upon that question.
Appellant concedes, however, that the note and mortgage in question were executed by the said Joseph Brun, owner of the sheep, which were then in Bingham county, Idaho, to the respondent bank at its banking house at Ogden, Utah, that the entire transaction took place there, and that that was the place fixed for the payment of the note, although the sheep in question were in Idaho. This transaction would not constitute doing business in the state of Idaho, within the meaning of art. 11, sec. 10, of the constitution and C. S., sec. 4772. (Diamond Bank v. Van Meter, 19 Ida. 225, 113 Pac. 97; Foore v. Simon Piano Co., 18 Ida. 167, 108 Pac. 1038; Bonham Nat. Bank v. Grimes Pass Placer M. Co., 18 Ida. 629, 111 Pac. 1078; 14 C. J. 1278, sec. 3893, and cases cited under note 37.)
With regard to the errors that are predicated upon the insufficiency of the affidavit in foreclosure, or upon the alleged failure to file a copy.of the mortgage in the county where the sheep were found and taken possession of by the sheriff, who was proceeding to foreclose, it appears that the mortgagee had obtained possession of the mortgaged property, through the sheriff, for the purpose of this foreclosure, and it therefore becomes immaterial, so far as the claims of a subsequent attaching creditor are concerned, whether or not the affidavit contains an allegation that demand for the peaceable possession of the property had first been made. The same would be true with regard to the failure to file a certified copy of the mortgage in the county where the fore*235closure proceedings were being had, from the recorder of the county where the mortgage was on file.- The sheriff is the agent of the mortgagee, and he having obtained possession of this property and it being in process of foreclosure without objection on the part of the mortgagor, an attaching creditor of the mortgagor whose levy was made subsequent to these proceedings cannot avail himself of any of these alleged irregularities. (Martin v. Holloway, 16 Ida. 513, 102 Pac. 3, 25 L. R. A., N. S., 10; First Nat. Bank of St. Anthony v. Steers, 9 Ida. 519, 108 Am. St. 17, 75 Pac. 225.)
For the reasons herein stated, the judgment of the court below is affirmed, with costs to respondent.
McCarthy and Dunn, JJ., concur.