It shall be the duty of every officer who conducts any such sale to apply the proceeds thereof as provided in § 21-47-18, except that the surplus, if any, shall be paid to the clerk of the circuit court and he shall give his receipt therefor. The sheriff shall forthwith give notice by mail to the mortgagor, his personal representatives or assigns, and to all persons holding junior encumbrances or liens, of the deposit of such surplus with the clerk.
SDCL 21-48-16