The Massachusetts manufacturer of such iconic candies as Necco wafers, Clark bars and those heart-shaped Sweethearts decorated with romantic sayings says it will shut down and lay off nearly 400 workers unless it finds a buyer.

Necco CEO Michael McGee wrote in a letter last week to Revere Mayor Brian Arrigo the company would close its plant in the city north of Boston if it can't find a buyer by May 6. Negotiations with potential buyers are ongoing.

Necco, which stands for New England Confectionary Co., traces its roots to 1847 and calls itself the nation's oldest continuously operating candy company.

The company's headquarters was sold last year for $54.5 million to developers who envisioned robotics, biotech and laboratory space at the site, with enough room to continue candy making.