1. When a mortgage or deed of trust is foreclosed, the court shall do all of the following:
a . Render judgment for the entire amount found to be due.
b . Direct the mortgaged property, or so much thereof as is necessary, to be sold to satisfy the judgment, with interest and costs.
c . Determine issues of title raised in the pleadings to establish the rights and priorities of the parties and persons served with notice pursuant to section 654.15B in the property subject to foreclosure as may be reasonably necessary to allow a purchaser at a sheriff’s sale to obtain clear title.
2. A special execution shall issue under such conditions as the decree may prescribe, and the sale under the special execution is subject to redemption as in cases of sale under general execution unless the plaintiff has elected foreclosure without redemption under section 654.20 .
3. The clerk shall provide a copy of the decree by ordinary or electronic mail to all parties in the foreclosure proceeding and all persons served with notices under section 654.15B .