。
It was polite of him to write a thank-you note.
Literal
Thank-you-letter [object-を] write [quotative-とは] he [too-も] was-polite.
~とは ('the fact of X,' an emphatic nominalizer) frames the preceding clause as the content being evaluated. 礼状 is a set compound — 礼 ('gratitude') + 状 ('letter, document') — 'letter of thanks.' 礼儀正しい ('polite, well-mannered') is a compound adjective: 礼儀 ('manners') + 正しい ('correct').