WASHINGTON — Brent Brown used to call Barack Obama a liar who had betrayed America. Then one day last year, while in the throes of a painful flare-up of his ulcerative colitis, he sat down and wrote Mr. Obama a letter thanking the president for saving his life.

Mr. Brown’s improbable story — that of a Republican who campaigned against Mr. Obama but eventually came to credit the president’s signature health care law with his very survival — got the attention of the White House, where the mail has taken on an outsize role in the writing of Mr. Obama’s legacy in his last year in office.

So when it came time this month for Mr. Obama to promote the Affordable Care Act in Milwaukee, Mr. Brown, 32, got the chance to sit down for a lunch with the president, and then introduce him to a crowd of 700 at a middle school there.

“I would not be alive without access to care I received due to your law,” Mr. Brown, who recently had surgery to treat his disorder, a chronic inflammation of the bowels, had written to the president. “So thank you from a dumb young man who thought he knew it all and who said things about you that he now regrets.”