Lawyers often warn their clients to be careful about what they say in emails. Sometimes they need to hear that advice themselves. In separate cases in May, a DLA Piper partner and the chief judge of the U.S. Court of Appeals for the Federal Circuit landed in hot water because of inappropriate remarks in emails. One stayed in his job. The other didn’t.

Nicholas West, a sports law partner in DLA’s London office, was the subject of an inquiry by his firm in May after several email exchanges laced with sexist jokes were leaked to U.K. tabloid Sunday Mirror by his former personal assistant. In emails sent to DLA client Richard Scudamore, the chief executive of the Premier League, the U.K.’s top soccer league, West made several lewd comments, calling women “gash” and “big-titted broads.” Referring to one of Scudamore’s female colleagues as “Edna,” West wrote that he had “spent all day fending Edna off my graphite shaft.”When the emails became public, West apologized in a statement, saying that he had “let myself, my firm and its clients down.”

Although DLA called West’s emails unprofessional, a firm spokesman told sibling publication The Am Law Daily that no action would be taken against him. “We have accepted Mr. West’s assurances that these emails are not reflective of his beliefs and values and that there will be no recurrence of this behavior,” the firm said in a statement.

The West emails came to light just over a year after another set of controversial emails emerged at DLA. During litigation over legal bills last year, discovery turned up emails in which several DLA attorneys bragged about how much they were billing their client. “That bill shall know no limits,” one wrote. DLA called the emails an “offensive and inexcusable effort at humor.” (The billing dispute later settled.)

While DLA lawyers were tripped up by dubious jokes, Randall Rader, chief judge of the U.S. Court of Appeals for the Federal Circuit, got into trouble with an ill-considered compliment.

In March, Rader sent an email to Weil, Gotshal & Manges litigation partner Edward Reines, who the day before had appeared before an appellate Federal Circuit panel to argue a case on behalf of Life Technologies Corp. Seth Waxman of Wilmer Cutler Pickering Hale and Dorr was Reines’ opponent. As reported by sibling publication The Recorder, Rader, who was not on the panel, passed along remarks from one of the panel judges. “She said Seth had a whole battery of assistants passing him notes and keeping him on track. You were alone and IMPRESSIVE in every way,” he wrote.

“In sum, I was really proud to be your friend today!” Rader concluded in the email, adding that he would “encourage you to let others see this message.”

After the email went viral, Rader wrote an open letter to colleagues on the court, apologizing for being “inexcusably careless.” He said that his friendship with Reines did not affect his impartiality, but said that his correspondence had created an appearance of partiality, which he said violated the interests of the courts. Rader stepped down as chief judge on May 30 and at press time was set to leave the court on June 30.

Shouldn’t lawyers know better than to put potentially embarrassing sentiments into an email? Gerald Lebovits, a New York civil court judge who has written about email etiquette, says that some attorneys and judges don’t consider the possibility that their email could be shared with others—or subject to a subpoena. “Sometimes it is just stupidity, or unfamiliarity of how it might be used,” he says. On the other hand, he adds, “you need to be able to speak candidly with your client and with members of your own law firm.”