Who do we think Sansa wrote to? Has that been discussed yet?
Almost certainly Littlefinger. She seemed unhappy and desperate for doing whatever she was doing at the moment.
Some, or one, suggested here that she was writing to Blackfish, which makes little sense to me. She had already dispatched Brienne for that and seems a waste of time and resources to focus attention on one army.
I am not sure if she is aware of the siege or not--probably, I don't recall that exchange before sending Brienne off--but it makes even less sense to spend that amount of attention on a dude and his army that is currently trapped by another army.
Littlefinger is ready to aid her with a very large army--she knows that. She also knows that Littlefinger's intentions are dubious. Hence the resignation.
....only other thing I can imagine is writing to Cersei to tell her to come get her at Winterfell. ...if that message gets to Jaime at the same time Brienne is there, I could maybe see a tenuous truce/alliance forming between Lannisters (they don't seem to like the Freys all that much anyway), and Blackfish to sack Winterfell and kill Ramsay.
For what it's worth, I didn't read those screengrabs that other's mentioned, but I like this latter idea. It seems dramatic and a bit out there, but would at least show some balls on Sansa's part for the first time ever.