The City of Nashua paid a scammer $41,000 before catching on to the scheme, Mayor Jim Donchess said this week.

Donchess told the Board of Alderman Tuesday night that the city may be able to recover the funds.

“The city is not out of the money at this point,” Donchess said.

The scam happened when a hacker got into the computer system for an out-of-state vendor the city contracted with as part of the health department’s move from the Mulberry Street offices to Main Street. During the hack, the hacker learned that the city had a contract with the vendor, and used that information to get money from the city.

Donchess said the hacker created a fake email account almost identical to the vendor’s genuine email account, and the hacker then started sending invoices to the city. The city’s accounting department paid the money, sending it directly into the scammer’s bank account, Donchess said.

Donchess said the city’s legal department is involved and working with the vendor on the issue. Nashua police are also investigating. Michael O’Brien, vice president of Nashua’s Board of Aldermen, said the city’s financial practices are secure, but this was a case of a clever criminal getting around the system.

“They used a legitimate name of a legitimate person,” O’Brien said.

The scammer reportedly added an “s” to the vendor’s name in the fake email address, something that initially went unnoticed by city staff.

“It goes to show the audacity of some of these people,” O’Brien said.

This isn’t the first time Nashua’s city hall has dealt with scammers during Donchess’ administration. In 2017, city officials contacted police and FBI agents when a volunteer grant writer working in Donchess’ office started acting suspiciously about city bank accounts, according to court records.

That grant water was in fact Dana Lawrence, a reputed con artist who at the time was on the run from police after violating probation for a theft conviction in Rhode Island. According to court records  Lawrence spent years running cons on people, using different names and social security numbers to stay ahead of the law.

In 2005, Lawrence was convicted of fraud in New York and Rhode Island. Lawrence told the victims that she was about to inherit a $28 million trust fund, according to court records. Lawrence then got the victims to loan her money against the fictitious trust fund. She managed to steal nearly $50,000 from two victims.

Lawrence was sentenced to 10 years in jail in that case. After serving about a year she was released and disappeared before showing up in Nashua with a new, allegedly stolen identity. After her arrest in Nashua, Lawrence sued city officials for $5 million. That case was eventually dismissed. She was released from prison in 2018.