Except and unless notice is given to the council in writing of an intention to contest or enjoin the collection of any special assessment for the construction of any pavement, sewer, or other public improvement, the construction of any sidewalk, or the removal or abatement of any public hazard or nuisance, within thirty days after the date of the meeting of the council at which the assessment roll in question is confirmed, which notice shall state the grounds on which the proceedings are to be contested, no suit or action of any kind shall be instituted or maintained for the purpose of contesting or enjoining the collection of such special assessments; and regardless of whether or not any public improvement is completed in any special district, no owner of real property located in such district shall be entitled to commence any suit or action for the purpose of contesting or enjoining the collection of any such special assessments after he has received the benefits from the substantial completion of that portion of such public improvement for which he is assessed.