First US president drew hope from citizens’ response to devastating British attack in handwritten letter