I’m not sure what suggestions you are looking for if you want to write a non-generic message but don’t tell us the circumstances.
Generally I suggest keeping it professional even if you don’t like your boss as you can’t rule out the possibility of your boss saying “Look how unprofessional this person is” and sharing your note with people who don’t know either of you.
For me personally, I’d say something like “Per your request, I am quitting XYZ corporation effective 11/15.”
If you are quitting because of the mandate DON’T. Make him fire you