Ordinarily, under the provisions of our code, an action must be brought in the name of the person having the legal right to maintain it, and the legal right is in the person to whom, according to the terms of the written contract, its obligation is due. Where a promissory note is secured by mortgage, and the note itself is indorsed and delivered to a third person, together with the mortgage as collateral security to its payment, the mortgage itself being not assigned in writing, the right of action upon the note is in the indorsee, because to that paper he acquires the legal title. The indorsee, however, cannot, in his own name, maintain an action for the foreclosure of the mortgage, but his remedy — he having only an equitable interest — is to foreclose in the name of the original mortgagee, suing for his use. By section 2244 of the code, all choses in action are assignable in writing so as to vest in the assignee the legal title. According to section 1996 of the code, the lien of a mortgage is made assignable in writing and not otherwise, such liens being embraced within the general class of liens comprehended within the terms of that *449section, as will be seen by reference to paragraph 5 of section 1972 of the code. So that, whether we treat the mortgage independently as a separate chose in action, or whether we treat it as a lien made assignable in writing by section 1996 of the code, the legal title-to it remained in the original mortgagees, and the bank, taking it by delivery only, took it subject to the equities between the mortgagor and mortgagees. The proceeding to foreclose was instituted by the bank in the name of the mortgagees, for its use. The claimant proposed to prove, and did offer evidence to the effect, that the property covered by the mortgage was her property, and not the property of her husband, the mortgagor; that he had no interest in it; that it was bought by him for her at an administrator’s sale of property belonging to her father’s estate; that her husband was present, bid for it, and it was knocked down to her and charged to her as a part of her distributive share in said estate. These facts were known to the mortgagees at the time the mortgage was executed; and if the proceeding had been instituted by the original mortgagees, it cannot be doubted that as between them and this claimant, her property could not be subjected to the payment of her husband’s debts. The assignee of this mortgage stands in no better situation than did the original mortgagees. The court therefore erred in directing a verdict finding the property subject. Judgment reversed.