CNN  — 

Former President Barack Obama sent an email to Ronny Jackson, a former White House physician who went on to become a GOP congressman, expressing his “disappointment” over Jackson’s criticism of Joe Biden’s cognitive health in 2020, according to a copy of the email obtained by CNN.

Obama sent the email, which Fox News first reported, when Biden was running for president and Jackson was running for Congress in Texas. Jackson retweeted a video of Biden with the message: “Remember the cognitive test that I gave @realDonaldTrump? The one he aced! Sounds like somebody else might need some testing done!! Scary!!”

Jackson received an email from Obama shortly after. The email is included in Jackson’s yet-to-be-released memoir titled “Holding the Line: A Lifetime of Defending Democracy and American Values.”

Former President Barack Obama, left, and US Rep. Ronny Jackson

“I have made a point of not commenting on your service in my successor’s administration and have always spoken highly of you both in public and in private. You always served me and my family well, and I have considered you not only a fine doctor and service member but also a friend,” Obama said in the email.

Obama added: “That’s why I have to express my disappointment at the cheap shot you took at Joe Biden via Twitter. It was unprofessional and beneath the office that you once held. It was also disrespectful to me and the many friends you had in our administration. You were the personal physician to the President of the United States as well as an admiral in the U.S. Navy. I expect better, and I hope upon reflection that you will expect more of yourself in the future.”

Jackson served as a physician for Obama as well as Presidents Donald Trump and George W. Bush. He retired from the Navy in 2019 before launching his congressional bid.

Jackson’s office did not immediately respond to a CNN request for comment. Obama’s office declined to comment.

CNN’s Jeff Zeleny contributed to this report.