Three hundred years ago, before envelopes, passwords and security codes, writers often struggled to keep thoughts, cares and dreams expressed in their letters private.

One popular way was to use a technique called letter locking -- intricately folding a flat sheet of paper to become its own envelope. This security strategy presented a challenge when 577 locked letters delivered to The Hague in the Netherlands between 1689 and 1706 were found in a trunk of undelivered mail.

The letters had never reached their final recipients, and conservationists didn't want to open and damage them. Instead, a team has found a way to read one of the letters without breaking its seal or unfolding it in any way. Using a highly sensitive X-ray scanner and computer algorithms, researchers virtually unfolded the unopened letter.

"This algorithm takes us right into the heart of a locked letter," the research team said in a statement.

"Sometimes the past resists scrutiny. We could simply have cut these letters open, but instead we took the time to study them for their hidden, secret, and inaccessible qualities. We've learned that letters can be a lot more revealing when they are left unopened."

The technique revealed the contents of a letter dated July 31, 1697. It contains a request from Jacques Sennacques to his cousin Pierre Le Pers, a French merchant in The Hague, for a certified copy of a death notice of Daniel Le Pers.

The details may seem prosaic, but the researchers said the letter gives fascinating insight into the lives of ordinary people -- a snapshot of the early modern world as it went about its business.

The trunk of correspondence belonged to a postmaster called Simon de Brienne and his wife, postmistress Marie Germain. It was acquired by the Museum voor Communicatie in The Hague in 1926.

In addition to the unopened letters, it contains 2,571 opened letters and fragments that for one reason or another never reached their destination.

At that time, there was no such thing as a postage stamp and recipients, not senders, were responsible for the postal and delivery charges. If the recipient was deceased or rejected the letter, no fees could be collected and the letters weren't delivered.

A NEW WAY TO MINE HISTORICAL DOCUMENTS

The X-ray scanners were originally designed to map the mineral content of teeth and have been used in dental research -- until now.

"We've been able to use our scanners to X-ray history," said study author David Mills, a researcher at Queen Mary University of London, in a statement.

"The scanning technology is similar to medical CT scanners, but using much more intense X-rays which allow us to see the minute traces of metal in the ink used to write these letters. The rest of the team were then able to take our scan images and turn them into letters they could open virtually and read for the first time in over 300 years."

The new technique has the potential to unlock new historical evidence from the Brienne trunk and other collections of unopened letters and documents, the study said.

One tantalizing application could be to virtually unfold sealed items and letters in the Prize Papers -- an archive of documents confiscated by the British from enemy ships between the 17th and 19th centuries.

"Using virtual unfolding to read an intimate story that has never seen the light of day -- and never even reached its recipient -- is truly extraordinary," the researchers said in the statement.

The research was published in the journal Nature Communications on Tuesday.