It also starts the clock for your boss and your company, kicking off the transition plan of training, hiring, and otherwise covering your impending departure. The bad examples here are all too vague. With the last one, you're aligning yourself with company policy, which is good, but it still doesn't tell the reader how much notice that actually is. Be as specific as possible on the time you have between now and your last day.
Acceptance With Displeasure. It's possible that your boss won't take immediate action like the reaction above__but will make it clear that he or she isn't exactly happy about your resignation. Maybe, for example, she'll mutter a curt, "Thank you for letting me know," followed by two weeks of obvious displeasure or denial that you're leaving__through gruff comments ("You know, you're really leaving us in the lurch") or a refusal to interact with you more than absolutely necessary.