Warren Harding is not the most beloved of American presidents. Two of the earliest polls to assess presidential popularity, conducted in 1948 and 1962, ranked him last and last among chief executives. Harding served only briefly, from 1921 to 1923, before he died in office, but his administration has been widely regarded as visionless, ineffectual and corrupt. He slashed immigration quotas, appointed his cronies — one of whom, his secretary of the interior, accepted bribes from oil companies in what became known as the Teapot Dome scandal — and brought an end to the famously reform-minded eras of Teddy Roosevelt and Woodrow Wilson. Perhaps the best that can be said about Harding is that he seems to have been conscious of his defects. “I am not fit for this office and should never have been here,” he once conceded.

It is no wonder, then, that in 1964, after the historian Francis Russell gained access to letters from Harding to his longtime mistress, Carrie Fulton Phillips, the Harding family sued to halt their publication. Rumors of the affair were not new, but the letters — written between 1910 and 1920, before Harding assumed the presidency — confirmed the infidelity in startling detail. The Harding family feared that publishing them would further tarnish Harding’s legacy and hurt the entire family. To the dismay of many historians, a settlement was reached in which the Harding family, who owned the copyright to the letters, agreed to donate them to the Library of Congress in return for a guarantee that they remain sealed for 50 years. Russell’s biography appeared, sans letters, in 1968, but was no less scathing for their absence.

“He was looking at protecting the younger generation at the time,” Richard Harding, the president’s grandnephew, says of his father’s lawsuit. But the family is now prepared to break that seal. On July 29, the Library of Congress will make the original letters available to the public for the first time. “We’ve honored the trust,” Harding says, “and it’s time to release them.”

The correspondence is intimate and frank — and perhaps the most sexually explicit ever by an American president. Even in the age of Anthony Weiner sexts and John Edwards revelations, it still has the power to astonish. In 106 letters, many written on official Senate stationery, Harding alternates between Victorian declarations of love and unabashedly carnal descriptions. (While Phillips’s notes and some drafts of her letters have been preserved, her actual replies were not.) The president often wrote in code, in case the letters were discovered, referring to his penis as Jerry and devising nicknames, like Mrs. Pouterson, for Phillips.