As long as the envelope flap is able to close within the normal fold, you are within regulations.
If the envelope flap can't fold on its "normal fold", e.g., you're using the flap as a "side", then adding your own tape to seal it, you may run afoul of the DMM.
I don't think your post office cares what's inside the envelope. You just can't use the envelope as a cheap box. That flap has to fold down as designed.