An immediate estate or interest in or the benefit of a condition respecting any estate may be taken by a person under an instrument, although he be not a party thereto; and if a covenant or promise be made for the benefit, in whole or in part, of a person with whom it is not made, or with whom it is made jointly with others, such person, whether named in the instrument or not, may maintain in his own name any action thereon which he might maintain in case it had been made with him only and the consideration had moved from him to the party making such covenant or promise. In such action the covenantor or promisor shall be permitted to make all defenses he may have, not only against the covenantee or promisee, but against such beneficiary as well.
Code 1919, § 5143.