TMZ/Getty

Heather McDonald[1] and former 'RHOC' star Jim Bellino are on the same page, legally speaking -- they've settled his lawsuit against her ... TMZ has learned.

According to a joint statement released by Jim and Heather ... they've "reached a settlement of the dispute on mutually satisfactory terms." The joint statement also says Heather "never intended to cause any of the damage" to Jim's reputation or that of his business.

Jim, the ex-husband of 'RHOC' star Alexis Bellino[2], sued the comedian in June 2019, claiming she "shamelessly dished and peddled unsubstantiated gossip" about his divorce with Alexis on an episode of Heather's podcast, "The Juicy Scoop."

Heather, who used to appear on "Chelsea Lately" before starting her podcast, previously secured a victory in the defamation suit back in March, when a judge granted her motion to dismiss the lawsuit ... but Jim appealed.

The terms of their settlement are confidential ... so, it's unclear if any money changed hands. We're told Jim filed earlier this month to withdraw his appeal, but a judge still has to sign off.

Read more from our friends at TMZ