Updated

It seems the latest Anthony Weiner sexting scandal may have a purpose after all.

Recent revelations that the mayoral candidate continued sending racy messages and photos after he resigned in 2011 haven’t exactly done wonders for his campaign. A new poll shows Weiner is in fourth place in the upcoming Democratic primary and his campaign manager recently stepped down.

But, on the flip side, this whole scandal is working out splendidly for “The Good Wife,” actress Julianna Margulies told E! News.

“I would never want to benefit from someone else's pain but I have been emailing [our producers] for two weeks now. It is the gift that just keeps on giving,” she said.

Margulies plays Alicia Florrick in the CBS drama and during the series’ first episode she must stand beside her husband (Chris Noth) as he resigns following a cheating scandal.

This was eerily similar to Huma Abedin’s recent behavior, Margulies said.

“She had the exact look that I tried to capture in the pilot when you first meet the Florricks and you see her standing behind her disgraced man,” Margulies said of Abedin. “She had such a soul-less look. Her body was empty, her soul was somewhere else and she was just going through the motions.”

Margulies explained that the Weiner sexting scandal has made “The Good Wife” more true-to-life than ever before.

“It is shocking that in our fifth season, this show is more relevant than ever. It's amazing that my character is a character that women are looking to for answer as to how she feels about it,” she said.

One person who clearly isn’t looking to Margulies for advice is Weiner’s sexting partner Sydney  Leathers. The 23-year-old was spotted over the weekend getting into a car with Steve Hirsch, who manages the Vivid porn empire.