This is an example of how a goodbye letter should be written, as to for example the circumstances in which the letter is being written, and for what purpose etc..
When leaving a job, a place of work, or a place where for example you have been living, it is always considered courteous to bid farewell to your colleagues, hosts or friends, most especially if your departure is a permanent one.
Due to todays high usage of Internet, text messaging, video calls etc as means of communication, few people still write letters on a regular basis, and fewer still know how to write a letter that fits its purpose, in this case a farewell letter.
Always include the recipients address at the head of the letter, along with the date. Try to write using the same tone as if you were actually talking face to face with the person or people. Always wherever possible express your gratitude, be it for an enjoyable stay with friends, or years of good company from work colleagues.
Mention why you are leaving but be polite, even if you are leaving under less than happy circumstances. The length of the letter will depend on the relation you had with the person ie: if it was your boss, a friend etc…