WASHINGTON  Representative Christopher Lee of New York abruptly resigned on Wednesday night after a shirtless photo of himself, which he had e-mailed to a woman, was published on the Internet.

Mr. Lee, a two-term Republican from western New York, notified the House speaker, John A. Boehner, of his decision in a letter on Wednesday afternoon, after the scandal had erupted, according to senior Congressional officials.

Mr. Lee’s office released a statement in which he asked for forgiveness. “I regret the harm that my actions have caused my family, my staff and my constituents,” he wrote. “I deeply and sincerely apologize to them all. I have made profound mistakes and I promise to work as hard as I can to seek their forgiveness.”

The resignation came hours after Gawker, a gossip Web site, published an e-mail exchange that Mr. Lee, who is married and has a son, had with a 34-year-old Maryland woman he had met through Craigslist.