HARALSON, J.
1. The 1st, 2d and 3d grounds of demurrer question the equity of the bill, on the ground, that at the time the mortgage, — the foundation of the *690suit, — was ■ executed, the mortgagee, the ' Mercantile Trust Company, had not complied with the constitution and statutes of this State, requiring a foreign corporation to, file' with the Secretary of State an instrument in writing, properly executed, designating at least one known place of business in the State.- The bill shows plainly enough, that the mortgage was a New York and not an Alabama contract. It is the simple case of a foreign corporation, having its domicile and place of business in New York, lending to another corporation in the State of Alabama, a sum of money, and taking a mortgage on the property of the borrowing corporation to secure the loan, the mortgage being executed in New York and the bonds to secure the loan and their coupons, being also executed and payable in New York. Without more, by no just construction of our constitution and statutes, can this transaction of the loan of the money to the defendant company by the New York corporation, be held to be offensive to their provisions. Collier & Pinckard v. Davis Bros., 94 Ala. 456 ; Cooper Mfg. Co. v. Ferguson, 113 U. S. 127; 8 Amer. & Eng. Encyc. of Law, 346.
Moreover, the mortgage had already been foreclosed and the contract fully executed, and if it were true that the transaction originated with a foreign corporation, which had not complied with our laws, it would be too late to set that fact up for relief. — Russell v. Jones, 101 Ala. 261; Long v. Ga. Pac. R. Co., 91 Ala. 319; Craddock v. A. F. L. M. Co., 88 Ala. 282.
2. It is well settled that the possession of a chattel by a purchaser at sheriff’s sale, under execution against the mortgagor of the chattel, is not adverse to the mortgagee, so far as to invalidate a subsequent sale under the mortgage by the mortgagee. — Williams v. Hatch, 38 Ala. 338; Herbert v. Hanrick, 16 Ala. 581; Brunson v. Morgan, 86 Ala. 320. The doctrine invoked by the 3d and 14th grounds of the demurrer, that the defendant was in the adverse possession of the property in question, at the time the bill to foreclose "the mortgage was filed, and at the time the complainant purchased at the foreclosure sale, is without force against the equity of the bill. The rule against maintenance does not apply when the sale is what is called a judicial sale, or is made by a public officer under legal process. — Humes v. Bern*691stein, 72 Ala. 547 ; 5 Am. & Eng. Encyc. of Law, (new ed.), 842, and authorities cited.
3. In the absence of limitation or restraint by statute, a railroad corporation has the limited power to borrow money as incidental to the proper conduct of its business, and to make bonds, notes and bills for its repayment, and to mortgage its property, real or personal, as security for such debt. — S. & M. R. Co. v. Lancaster, 62 Ala. 555 ; Kelly v. Trustees A. & C. R. R. Co., 58 Ala. 489.
It is also an established doctrine in England and in this country, that a valid mortgage. may be made of property not in existence at the date of the mortgage, so as to operate and attach upon it as soon as it comes into existence, and make-it in equity an effective security for the debt provided for in the mortgage. — 15 Am. & Eng. Encyc. of Law, 749, and numerous authorities there cited ; Patapsco Guano Co. v. Ballard, 107 Ala. 710.
, From the foregoing it appears that the 5th, 7th and 10th grounds of demurrer were without merit.
4. The 13th ground questions generally the equity,of the bill, and this and the motion to dismiss for the want of equity may be disposed of together.
The bill alleges the execution and foreclosure of the mortgage, and the purchase of the property by the complainant. The defendant company claims under an execution sale made after the mortgage had been duly recorded. The bill alleges, that “at, and prior to the tihie when said execution had been levied, the defendant, Electric Lighting Company, knew of the existence of the mortgage or deed of trust, and that the same was recorded.” If this be true, as it must be held on demurrer, the defendant company could not be a bona fide purchaser for value without notice. Besides, in purchasing at execution sale, the defendant took the property subject to the equitable title of the mortgagee, under whose, mortgage the complainant claims. “To such sales the rule of caveat emptor applies in its utmost vigor and strictness ; ’ ’ and the purchaser acquires no other or greater interest in the property than was possessed by the execution debtor at the time of the sale. — Lindsay v. Cooper, 94 Ala. 170, 178 ; Lovelace v. Webb, 62 Ala. 271; Fore v. McKenzie, 58 Ala. 115; Bland v. Bowie, 53 Ala. 162.
*692The legal title of this property, acquired after the execution of the mortgage, remained in the mortgagor, the Mobile & Spring Hill Railroad Company, and when it came into existence under, and the mortgage attached .to it, the mortgagor held the legal title as trustee for the mortgagee, the Mercantile Trust Company, under which the complainant derives the same equitable title. This equitable interest, a court of equity will enforce and protect against all persons other than bona fide purchasers without notice. — Patapsco Guano Co. v. Ballard, 107 Ala. 710 ; Jackson v. Jackson, 91 Ala. 293 ; Hurst v. Bell, 72 Ala. 336; Mayer & Co. v. Taylor & Co., 69 Ala. 403; McBrayer v. Cariker, 64 Ala. 50 ; Milner v. Rucker, 112 Ala. 360.
The motion to dismiss the bill for want of equity and the demurrer questioning its equity were properly overruled. '
It is unnecssaiy to notice the other grounds of demurrer, to which the. bill, on its averments, was not open.
Affirmed.