Farewell letters are written when one party is leaving the other ; either a group of people or individuals. It is therefore courteous to give a written goodbye.
The essential components of a good farewell letter are firstly, to address the recipient in a friendly tone of language. One can use the same tone and form of language as they were used to, just like conversing with them.
Secondly, the letter should announce or confirm the actual departure of either the individual writing or the recipient leaving. Detailed explanations may be left out according to the circumstances of the imminent departure.
The letter should express gratitude of having known or spent time with the recipient. The writer should reminisce on memories shared. Final thoughts should then follow together with an inviation to communicate if appropriate.