So if you do not want to court social disapproval don't tell people yet. This is also not strictly etiquette point but it can also have a very unfortunate legal effect on the divorce proceedings. So a body should take extra care to express affection and regrets in the places it cannot be. Not unless she knows about it in advance. It depends on how special.
Electronic mail is a wonderful thing but it is very informal.
Now birthday cards are also very informal but wedding invitations or expressions of gratitude for receiving presents are not informal and require a formal means of communication. The important thing to remember is that e-mail is an addition to the forms of communication. It does not wipe out the previous ways of communicating. Here's another question on the same subject. It depends on what you are thanking the person for.