The most recent story of the resignation of the CIA Director, Retired General Petraeus, after public disclosure of his extra-marital affair referenced in uncovered emails by the FBI was startling to most people. While there are no allegations of his divulging privileged and confidential information, his resignation was due to the fact that the FBI investigated the emails to determine whether he was at risk of being blackmailed due to his affair.
So one lesson that can be learned from the part of the story relating to emails is that not even the Director of the CIA was able to safeguard his private emails from discovery and review. Emails when written leave "digital footprints" as to their origin and the internet address of the writer. There are many, many computer experts who live for uncovering the origin of emails and piercing attempts to maintain secrecy. Apparently, an old trick, that I did not even consider was to open an email account with the boyfriend/girlfriend and share the password and not even send emails to each other but rather just write a "draft" email and leave it unsent in the account. The other person would then sign on read the "draft" and respond by leaving another "draft". However, according to a recent article on this subject on CNN this trick is considered "old hat" and "dated".
The bottom line besides the fact that you should not be having an extra-marital affair is that you should never put anything in writing that you are not prepared to have anyone and everyone read. The expectation of privacy and having electronic secrets is over.