A Professional Greeting. Your letter should be addressed to your boss. There's a good chance that this letter will merely end up in a file in HR, but it starts with your boss. Assuming this is someone with whom you work reasonably close with on a daily basis, it doesn't have to be super stiff and formal. Specific and professional is the right tone here.
Prepare for It. Like the situation above, you should go into the conversation knowing how you'll respond if your boss asks you to extend your notice. If you've landed another job offer and have already set a start date, this may not be possible__so practice sticking to your guns: "Because I have a new opportunity lined up, my last day here is firm.