The king only gives you the letter from the princess AFTER you defeat the Koopa and undo the curse. It reads something like “Thank you Mario! Here is a letter from the princess.”

It should go like this:

“Many thanks, Mario. Here is my end of the bargain, and we’ll stop intercepting your mail. Heh heh heh.”

*Mario takes the letter and begins to walk out. Guards seize him and throw him out the front door.*

“…and don’t fuck with the kingdom of Grass Land!” (or insert whatever world you were just in)

Mario always did have a lot of dramatic potential.