Ahh, here's what you need to do:
and no, I'm not making this up.
1) Make sure your T-Mobile plan supports MMS messaging.
2) Call up T-Mobile, tell them you're using an unlocked iPhone (they are fine with this) and that you need to speak to tech support to obtain the correct APN settings.
3) Go to Settings>General>Network>Cellular Data Network, and enter in thr APN settings they give you, exactly.
It may/may not work the first or second time around. It may/may not take some trial and error.
Expect this. It's perfectly normal.