Within thirty days after any such beasts may have come or been found upon any lands, the owner or occupant of the lands shall serve a written notice, either personally or by mail, upon the owner of the beasts, if known, that they are upon his lands, or in pound, as the case may be, and are held by him as strays or beasts doing damage, as the case may be; and if such owner is not known, he shall publish such notice, within such time, in the nearest newspaper of the county for at least two successive weeks.
N.Y. Town Law § 313