Foley resigned from Congress in 2006 after it was discovered he had sent sexually explicit messages to a male congressional page. Contents of sexually explicit instant messages sent by Foley were published by media organizations during the scandal. After resigning, the six-term congressman checked into a rehab facility and revealed that he was gay.