Restore S/MIME class after close