I can't answer the email/turn chess technical question, but as for standard OTB (over the board) rules...
If an illegal move has been made and neither player has noticed it for at least 10 moves afterwards, then the game continues on as played. If it is discovered within 10 moves, then you must return to the position where the error occured and play a legal move. Touch move still applies, so having touched the king you'd now have to move it if possible.
When playing the computer it won't let you castle after having been in check, but I notice this is not the same when playing email chess. Castling will be accepted even if you have been in check - should this be fixed?
Also, what are the rules if you castle having been in check? If your opponent doesn't notice until several moves later do you play on?