All rules have exceptions. There are times when a letter of resignation should be frank. There are even more occasions when writing a candid letter seems extremely tempting.
In most cases, however, the wisest move is to resign gracefully and without recrimination. Doing so makes it harder for those remaining to claim that an intemperate attitude was behind your departure. A restrained resignation also doesn't burn bridges and, oddly enough, you may need to recross a bridge or two some day.
A letter of resignation is one of those social gestures with an expected script. Just as the usual query of "How are you doing?" does not anticipate a full medical and financial report, so too is a letter of resignation not expected to reveal all grievances and criticisms.
As a result, a letter of resignation should be gracious, brief, and above all, discreet.
Discretion can be the greatest form of style and style leaves a lasting impression.