ROCKLAND, Maine — Cheryl Denz said she never imagined that she was doing something wrong when she organized a raffle to help pay for a new cooler for her downtown farm market.

But a call from the gaming division of the Maine Department of Public Safety on Monday informed her otherwise.

Denz has operated the Terra Optima Farm Market on Main Street in Rockland since July 2013. She had earlier operated a smaller market at the intersection of Routes 1 and 131 in Thomaston, which helped market the products that come from her Terra Optima Farm in nearby Union.

“We’re a farm stand. We run it by the seat of our pants, we don’t have a lot of money,” Denz said.

So when the cooler at the Rockland market began experiencing increasing number of maintenance problems, Denz tried to figure out a way to pay for a replacement. The cooler is more than 20 years old, and it’s difficult for repairers to find replacement parts. The cooler cost her $1,800 when she purchased it, and during the past year, she spent $2,700 on repairs.

The cost to buy a new one ranges from $3,000 to $6,000. Denz said she wanted to purchase a state-of-the-art cooler that would be as energy efficient as possible.

To pay for the cooler, Denz came up with the idea of holding a raffle. The top prize was a dinner for six. Other prizes were a $150 gift box of mixed meats and homemade sausages, as well as several $20 lunch specials.

The start of the raffle was announced on her Facebook page, which offers regular “Farm Market” updates. Her farm has livestock such as pigs, cows and chickens. Terra Optima also grows some vegetables.

About a week into the promotion of the raffle, Denz got a telephone call Monday at the market from the gaming division telling her that what she was doing was illegal.

“Never in a million, million years did I think I was doing something wrong,” she said.

References to the raffle online were immediately taken down, she said. She had her computer at the market that day and as soon as she got off the phone she removed the raffle from her website. The raffle jar was taken off the counter, and she then began contacting people who had bought tickets and offered them their money back.

“Nearly all the people said I could keep the money. People are great,” she said.

About $800 had been raised when the raffle was canceled. The tickets had sold for various prices from $5 to $20.

Maine Public Safety spokesman Stephen McCausland said that only nonprofit organizations can hold raffles in Maine. The department receives a couple complaints per year about businesses other than nonprofits holding raffles for various reasons.

The state, however, does not take enforcement actions against violators.

“The people are generally not familiar with the games of chance laws in the state. We work with people to educate them about the law,” McCausland said.

Denz said she is not sure what she will do now. She has considered undertaking a crowdsourcing effort but said that would consume a lot of time. People posting on her Facebook page suggested crowdsource sites such as kickstarter while others wished her the best. One person said that if the public became aware they might help out.

In the meantime, she crosses her fingers and hopes she can get a little more life out of the cooler. She said summertime puts more stress on such refrigeration units.

The store is located at 218 Main St. at the intersection of Robinson Street. Hours of operation are 9 a.m. to 7 p.m. Monday through Saturday.