DeWayne Craddock submitted a short and courteous resignation letter on Friday, telling a Virginia Beach official it had been a “pleasure” to work for the city.

Hours later, he fatally shot 12 people, almost all of whom were colleagues.

The striking disconnect in the email released on Monday by Virginia Beach officials deepened the mystery around what prompted America’s worst mass shooting this year.

Investigators continue to probe Craddock’s personal and professional life, looking for a motive.

“I want to officially put in my [two] weeks’ notice to vacant my position of Engineer III with the City of Virginia Beach.” Craddock wrote. “It has been a pleasure to serve the city, but due to personal reasons I must relieve my position.”

Mass shootings in America Show all 8 1 /8 Mass shootings in America Mass shootings in America Camden shootings – 1949 Howard Unruh killed 13 people, including three children, during a 12-minute walk through his neighborhood on September 6, 1949, in Camden, New Jersey, when he was 28 years old. The incident became known as the "Walk of Death". Unruh was found to be criminally insane and died in 2009 after a lengthy illness at the age of 88, following 60 years of confinement. Alamy Mass shootings in America University of Texas tower shooting – 1966 Charles Whitman killed 17 people and injured 31 others in Austin, Texas. After stabbing his mother and wife the night before, he headed to the University of Texas, where he opened fire on people in the campus and streets from the observation desk. He was shot dead after a policeman and civilian reached the scene. Austin History Center, Austin Public Library Mass shootings in America Easter Sunday Massacre – 1975 James Ruppert killd 11 family members in his mother's house, which included his mother, brother and his wife, as well as their eight children. He used a magnum, two handguns and a rifle. Mass shootings in America Wilkes-Barre shootings – 1982 Former prison guard, George Banks, shot dead 13 people in Pennsylvania, including five of his own children. AP Photo/Times Leader Mass shootings in America Wah Mee massacre – 1983 Three men, Kwan Fai Mak, Wai-Chiu Ng, and Benjamin Ng, killed 13 people who were in Seattle's Wah Mee gambling club. YouTube/KIRO 7 News Mass shootings in America San Ysidro McDonald's massacre – 1984 James Huberty killed 21 people and injured 19 others after he walked in a McDonald's in San Diego. He was shot dead by a sniper after 78 minutes of him entering the restaurant. Alamy Mass shootings in America Palm Sunday massacre – 1984 Ten people were shot dead from handguns at close range in a New York home. A baby girl was the only survivor after convicted dealer, Christopher Thomas, shot three women, one teenage girl and six children in their Brooklyn home. Thomas was convicted of manslaughter and cleared of murder. He was released from prison after 32 years. Mass shootings in America Edmond post office shooting – 1986 Patrick Sherrill, a postal worker at the Edmond post office in Oklahoma, killed 14 co-workers and injured 6 others, before he shot himself. Oklahoma Highway Patrol Collection

The city redacted the receiver’s name. The receiver wrote back, saying he or she hoped Craddock could resolve the issues and asked whether 14 June would be his last day.

Craddock replied that it would. The personal issues Craddock mentioned went unexplained.

City officials also redacted the time the email was sent but said at a previous news conference that it was Friday morning. Just after 4pm that day, Craddock used two .45-calibre pistols to open fire in the municipal building where he worked.

He died after a gun battle with police.

City spokeswoman Julie Hill said the city released the letter because it “wanted to dispel any insinuation that there was something substantive in his two-week notice that would have shed light on what he did next”.

Craddock, 40, was a longtime engineer with the city’s Department of Public Utilities, where he oversaw water and sewer projects. City officials have said Craddock had not been fired and they have not uncovered evidence of workplace problems.

“To my knowledge, the perpetrator’s performance was satisfactory,” City Manager Dave Hansen said at a Sunday news conference, adding that Craddock “was in good standing within his department...There were no issues of discipline ongoing.”

Some of Craddock’s relatives offered their first comments on the shooting on Monday, providing fresh details about his background.

Roger Hamilton, an uncle of Craddock who lives in North Carolina, said his nephew has long been estranged from one half of the family.

Mr Hamilton said his brother, Winfred Hamilton, had been married to a woman named Vestere Hamilton. Their only son together was Craddock.

They lived for a while in North Carolina, but the couple divorced when Craddock was about 10, and he moved with his mother to Virginia. She later married James Craddock.

Support free-thinking journalism and attend Independent events

Roger Hamilton said he learned that his nephew was the gunman on Saturday morning when his sister called him. She had received word from Craddock’s half sister, who had been contacted by law enforcement.

“There’s nothing else but shock,” Roger Hamilton said. “You hear about this, but you don’t think it’s going to happen in your family or to someone you know.”

Agata Craddock, the shooter’s ex-wife, declined to comment on Monday.

“I am still trying to process all this,” she said. “I was put in this position. I am not ready for this yet. I am not ready for this. I want to respect the people who died. I am cooperating with police and FBI, and those are the people who I will talk to.”

Court records show Craddock married his wife on Valentine’s Day 2008 in Virginia Beach.

The two separated on 6 September 2016, and divorced in August 2017, citing “certain differences”, according to court records.

The divorce was uncontested, and as part of it, DeWayne Craddock paid a lump sum of $25,000 (£19,700), court records show.

C Scott Acey, a partner at engineering company MSA, said Craddock worked there as a civil engineer from 2003 until 2008.

Mr Acey, who had been the younger man’s direct supervisor for much of the time, described Craddock as an “ordinary” employee who came to work on time and never had any disciplinary issues.

“He was a quiet employee, and he didn’t socialise a whole lot outside of the office,” Mr Acey recalled, although he did remember Craddock once mentioning that he had got engaged.

He was eventually laid off because of the 2008 recession.

Three days after the shooting, a sombre Monday played out at the city’s sprawling municipal complex, where some employees returned to work for the first time since the rampage unfolded in the three-story, brick Building 2.

'What action will you take to protect people like me and my classmates?' Tearful student asks Beto O'Rourke how he'll stop mass shootings

Many workers wore blue as they had been urged to do to show solidarity.

Some murmured about what a beautiful day it was and remembered those who were killed. Others didn’t speak but just put an arm around a colleague. Flags were at half-mast.

Alveta Green, who works in the complex, said no one can truly understand a mass shooting “until you have experienced it”.

“It makes it so surreal,” she said.

Staff in Building 6 gathered on Monday on the lawn outside with black memorial ribbons pinned to their blue shirts and dresses.

During a performance of the national anthem, a Christian prayer, a speech by the superintendent and 12 moments of silence, well over 100 returning workers silently embraced one another and clasped hands while they cried.

Authorities identified those killed as Virginia Beach residents Michelle “Missy” Langer, Ryan Keith Cox, Tara Welch Gallagher, Mary Louise Gayle, Alexander Mikhail Gusev, Katherine Nixon, Joshua O Hardy and Herbert “Bert” Snelling; Chesapeake residents Laquita Brown and Robert “Bobby” Williams; Norfolk resident Richard Nettleton; and Powhatan resident Christopher Kelly Rapp.

Marisha Clark, who lives across the street from the municipal complex, said she spent the weekend trying to figure out how much to explain to her kids – ages 7 and 11 – about the shooting.

“I will never get that out of my mind: my 11-year-old running into the house, shouting, ‘Mommy, there’s a mass shooting’,” Ms Clark said.

After she dropped her kids off at school on Monday, she went to the complex.

Outside of Building 6, she found a table full of brightly painted rocks, with paint markers for writing messages that will eventually go into a community rock garden.

Ms Clark took a yellow rock and held it in her hand for a long time.

“We’re not strangers. We’re community at this point. We are all hurting. We are really hurting,” she said.

She wrote in capital letters on the rock, simply: LOVE.