It was the day before the 2016 presidential election, and at the Volusia County elections office, near Florida’s Space Coast, workers were so busy that they had fallen behind on their correspondence.

Lisa Lewis, the supervisor of elections, stumbled on an important email sent to her and three others in the office, by then a week old, that appeared to be from VR Systems, the vendor that sells electronic voter list equipment to nearly every county in the state. “Please take a look at the instructions for our modernised products,” it said, using British spelling and offering an attachment. Something about the email seemed off.

“It was from Gmail,” Ms. Lewis said. “They don’t have Gmail.”

Ms. Lewis, it turned out, was right to be suspicious. Though it had VR Systems’ distinctive logo, with a red V and a blue R, the email contained a malicious Trojan virus, and it originated not from the elections vendor but from the Russian military intelligence unit known as the G.R.U. The email had been sent to 120 elections email accounts across Florida.

Also buried in Ms. Lewis’s inbox was a warning from VR’s chief operating officer, flagging the dangerous spearphishing attempt and warning all his customers not to click on it.