She married the future Fourth President of the United States, James Madison, about a year after being widowed. Madison didn't become president until 1809, but Dolley was a presence in the White House long before that, serving as hostess on many occasions during the administration of the Madisons' close friend, Thomas Jefferson.
Firstladies.org has this to say about her: "With more conscious effort than either of her two predecessors, and with an enthusiasm for public life that neither of them had, Dolley Madison forged the highly public role as a President's wife, believing that the citizenry was her constituency as well as that of her husband's. This would establish her as the standard against which all her successors would be held, well into the mid-20th century... She fortified her role of hostess by the visual effect of both the executive mansion and her own person, redecorating the public rooms in a style grand enough to impress foreign diplomats and dressing in a regal, yet simple manner. Her ebullient personality, although often masking deep-seated worry, had the effect of relaxing her guests, regardless of their political views. Dolley Madison also exercised political influence by utilizing all the acceptable forms of behavior for women at the time, through correspondence, entertaining and cultivating personal alliances with the spouses of important political figures. On numerous occasions, she sought to place supporters, friends and family members into official government positions.
"Her legend was made lasting, however, by her conscious act of symbolic patriotism in the hours preceding the burning of Washington by British troops during the War of 1812. She famously refused to leave the White House before being assured that the large portrait of George Washington was removed from the walls and taken safely away from potential destruction or defacing by the encroaching enemy."
And what of the snack cakes? (Spelled "Dolly" in the case.) The web site of Interstate Bakeries Corp. puts it this way: “ 'Cakes and pastries fine enough to serve at the White House.' That is how Roy Nafziger, IBC’s founder, described his Dolly Madison snack cakes at their introduction in 1937. Roy’s fascination with the First Lady Dolley Madison lent him the name and inspiration to create a high-quality snack fit for a socialite like Madison yet affordable for everyone."