Essentially, it should be kept brief and professional. Even though it may feel like a good opportunity to, this is not the best time to air any pent-up feelings or anger towards others or the company as a whole. Keep it formal, straightforward and concise. If you feel appropriate, state your reason for leaving and also may be valuable to mention your final date (keeping in mind of course your contract obligations). You may also wish to express a few words of thanks,, however try to keep it brief and to the point.