Before service can be made by publication an affidavit must be filed in the action showing the cause to be one for the specific performance of a contract for the sale of real estate, and that the defendant to be served with process is a nonresident of the state, and it being shown to the satisfaction of the court that the defendant is in fact a nonresident, the court shall order service by publication.
NMS § 42-7-3