The failure of an insurer to obtain a license or certificate of authority shall not impair the validity of any act or contract of such insurer and shall not prevent such insurer, its assigns or successors in interest, from defending any action in any court of this state; but no insurer transacting insurance business in this state without a license or certificate of authority shall be permitted to maintain an action in any court of this state to enforce any right, claim, or demand arising out of the transaction of such business until such company, its assigns or successors in interest shall have:
No action shall be maintained, except upon the conditions provided in this section, in any court of this state by any successor or assignee or assumptor of such unauthorized insurer which has acquired all or substantially all of the assets of such unauthorized insurer.
Ala. Code § 27-11-6 (1975)